Thursday, July 12, 2018
Move a List of PCs to a new OU
I needed to move 400 machine to a different OU and was provided a list. So I spent 5 min and put this together. Hope it helps someone.
Import-Csv "C:\temp\DistinguishedNames.csv" | ForEach-Object { Move-ADObject -Identity $_.DistinguishedName -TargetPath "OU=Computers,DC=YourDomain,DC=com" -Confirm:$false }
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment