CiscoAzn
asked on
Is there a script to move all disabled AD accounts over to a specified OU?
I have multiple sites/OU and each one have disabled accounts that i would want to automatically move to a different OU. Is there a Powershell script for this?
ASKER
What about pointing to a specific OU for the source of all the sites with the disabled accounts and the destination would the $Path. I don't want to run it for the entire domain.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I did a test and found out why it didn't work. Had to change from ADComputer to ADUser so this works perfectly thanks!
No prob, yeah I'd actually done this for computers on another question and just copy and pasted.
Did you need anything else on this question ?
If so let me know and I will be happy to help.
If so let me know and I will be happy to help.
Hi Cisco,
You can download the complete script from this given resource and I hope, it will help you to resolve your purpose for moving all disabled AD accounts to specific OU : https://gallery.technet.mi crosoft.co m/scriptce nter/Move- and-disabl e-inactive -b1cf86c3
You can download the complete script from this given resource and I hope, it will help you to resolve your purpose for moving all disabled AD accounts to specific OU : https://gallery.technet.mi
This question was indicated as answered in comment 40458167
This question was indicated as answered in comment 40458167
Ok, i did not see that.
ASKER
becraig I want to run this as a scheduled task and not able to. Do you have a way to do this? What is the Action that needs to be input to have this working?
Open in new window
If you already have the OU then this will work:
Open in new window
Remove the whatif to actually run.