logo powershell
Tech

function Get-FailedLogons

Laad de volgende functie… function Get-FailedLogons { [CmdletBinding()] param( [datetime] $StartTime = (Get-Date).AddDays(-1), [datetime] $EndTime = (Get-Date), [int] $MaxEvents = 10000, [string] $ComputerName = $env:COMPUTERNAME, [switch] $ExportCsv, [string] $CsvPath = […]

logo powershell
Tech

Overzicht Active Directory OU’s met Powershell

Get-ADOrganizationalUnit -Properties CanonicalName -Filter * -SearchBase “OU=SUSSE,DC=SUSSE,DC=LAN” | Sort-Object CanonicalName | ForEach-Object { [pscustomobject]@{ Name = Split-Path $_.CanonicalName -Leaf CanonicalName = $_.CanonicalName UserCount = @(Get-AdUser -Filter * -SearchBase $_.DistinguishedName -SearchScope […]

logo powershell
Tech

Restore AD-User

Wanneer je een Active Directory user verwijderd komt deze standaard in de Deleted Objects van je AD. Via Powershell kun je deze spoedig herstellen. Gebruik Get-ADObject met een include op […]