Computer container

  • 175 Views
  • Last Post 31 December 2015
Llara posted this 31 December 2015

Anyone can help with the following - looking for a script that will move computer objects from the containers OU to a different OU named "new servers" the script should only move computer objects that begin with ABC, 123 or MVA. 
The idea is to run the script from as schedule task.
Thank you!

Order By: Standard | Newest | Votes
kurtbuff posted this 31 December 2015

powershell, FTW

Get-adcomputer -searchbase "cn=computers,dc=example,dc=com" -filter
{name -like "abc*"} | move-adobject -targetpath "ou=new
servers,dc=example,dc=com"

Etc.
See, for example, this:
http://blogs.technet.com/b/heyscriptingguy/archive/2012/03/01/the-easy-way-to-use-powershell-to-move-computer-accounts.aspx

Kurt

show

Llara posted this 31 December 2015

Thanks Kurt! 


show

Close