Forum Discussion

Skipster311-1's avatar
Skipster311-1
Iron Contributor
Aug 10, 2021

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

Resources