Angeal
asked on
Powershell: Move all disabled AD accounts to "Ex Employees" OU
Can someone please help. I need to find all disabled user accounts and move them to a specified OU called "Ex Employees" using Powershell.
It would be great if the domain name and OU had a variable so I can use this in multiple environments easily.
THanks!
A.
It would be great if the domain name and OU had a variable so I can use this in multiple environments easily.
THanks!
A.
ASKER
Xxdcmast,
I would prefer to use the builtin AD cmdlets, if possible.
Thanks!
A.
I would prefer to use the builtin AD cmdlets, if possible.
Thanks!
A.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Subsun,
Works like a charm! Thanks for your help!.
A.
Works like a charm! Thanks for your help!.
A.
You're Welcome!!
Get-qaduser -disabled | move-qadobject -NewParentContainer {distinguished name of EX employees ou}