Forum Discussion
Skipster311-1
Aug 10, 2021Iron Contributor
PowerShell find disabled users with manager
Hello
I am trying to find all disabled users that have a value populated for the manager attribute. Below is my code
(get-adforest).domains | ForEach-Object {get-aduser -ldapfilter "(&(manager=*)(&(Disabled=True)))" -Properties givenname,surname,userprincipalname,emailaddress -Server $_}
Any help is appreciated
No RepliesBe the first to reply