Page tree
Skip to end of metadata
Go to start of metadata
Get-ADGroup -Filter * | Where-Object {$_.name -like "*admin*"  -and $_.name -notlike "*administrative*"} | %{Get-ADGroupMember $_.name} | Where-Object {$_.ObjectClass -eq "User"} | %{Get-ADUser $_.SID} | Sort name | Get-Unique | Select Name,SamAccountName,SID,Enabled

Zum Speichern in einer Datei folgendes am Ende hinzufügen:

 | Out-File C:\Users\USERNAME\Desktop\Admins.txt

Verwandte Artikel