Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Find active user with empty AD attribute named "ou", then export this list to CSV
- Get-QADUser -IncludedProperties ou | where { ($_.ou -eq $null) -and ( -not $_.AccountIsDisabled )} | select SamAccountName, name, Department | Export-Csv -Path c:\withoutOU.csv -Encoding utf8
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement