Export disabled Users
Search-ADAccount –AccountDisabled -UsersOnly
Import-Module ActiveDirectory
Search-ADAccount –AccountDisabled -UsersOnly |
Select -Property Name,DistinguishedName
Import-Module ActiveDirectory
Search-ADAccount -SearchBase “OU=TestOU,DC=NDSEDV,DC=de” –AccountDisabled -UsersOnly |
Select -Property Name,DistinguishedName
Import-Module ActiveDirectory
Search-ADAccount –AccountDisabled -UsersOnly |
Select -Property Name,DistinguishedName |
Export-CSV “C:\\Temp\\DeaktivierteADBenutzer.csv” -NoTypeInformation -Encoding UTF8