title: Need Assistance With a Powershell Script to Move a Computer Object in Active Directory to New OU As Soon as the Computer Object Gets Created in AD
body: <p>I have a script that deploys a new VM in my VMware environment. As soon as the computer object lands in the default &quot;Computers&quot; OU in Active Directory, I would like to have the script move the computer object to a different OU immediately. Trying to time this with a sleep is difficult because the time to build the VM varies each time the script is ran and other tasks that need to run won't perform their job successfully unless the computer object is moved out of the default &quot;Computers&quot; OU to a different specified OU immediately. Any thoughts of how to accomplish this would be much appreciated!</p>