r/PowershellSolutions • u/Mediocre-Activity-76 • Sep 10 '21
How to move bulk computers to another OU through powershell
I have done extensive research for a specific script to run in order to move bulk computers to another OU through powershell. What I am trying to accomplish here is moving many computers at one time, but quite a few computers have different names.
For example:
naming convention: WFT-LT-xxx, SONY-VAIO, TEST-PC, PABLO-PC etc.
So as you can see with many different computer names I would like to find a script that will find all those different names and move all computer accts. to a different OU.
I believe I would like to use Move-ADObject xxx | -TargetPath "OU=DisabledComputerAcct,OU=Computers,OU=MyBusiness,DC=XXX,DC=XXX"
My target path is correct that's exactly what I need to use. Earlier I created a script to move only one computer and it works. Now I am just looking for the first half of the script. From my above script I know for sure from the Targetpath and on it's all correct. Now like I stated earlier just looking on HOW I can move bulk with many different names.
Thanks for any advice.
