Post

Detecting Disabled Users with Powershell - Powershell ile Disable Edilmiş Kullanıcıları Tespit Etmek 

PS:

Genel sorgu:
Search-ADAccount –AccountDisabled –UsersOnly –ResultPageSize 2000 –ResultSetSize $null | Select-Object SamAccountName, DistinguishedName | Export-CSV “C:\DisabledUsers.CSV” –NoTypeInformation

OU bazlı sorgulama:

Get-ADUser -Filter * -SearchBase “OU=uyeler,DC=guler,DC=com ” -Properties * | Where-Object {$_.Enabled -eq $false} | Select-Object DisplayName,SAMAccountName,mail | Export-Csv -Path C:\\DisabledUsers.CSV -NoTypeInformation
This post is licensed under CC BY 4.0 by the author.