<p>How do I move an active directory group to another organizational unit using Powershell?</p>

<p>ie.</p>

<p>I would like to move the group "IT Department" from:</p>

<pre><code>  (CN=IT Department, OU=Technology Department, OU=Departments,DC=Company,DC=ca)
</code></pre>

<p>to:</p>

<pre><code>  (CN=IT Department, OU=Temporarily Moved Groups, DC=Company,DC=ca)
</code></pre>

I haven't tried this yet, but this should do it..
```
```
$objectlocation= 'CN=IT Department, OU=Technology Department, OU=Departments,DC=Company,DC=ca'
$newlocation = 'OU=Temporarily Moved Groups, DC=Company,DC=ca'

$from = new-object System.DirectoryServices.DirectoryEntry("LDAP://$objectLocation")
$to = new-object System.DirectoryServices.DirectoryEntry("LDAP://$newlocation")
$from.MoveTo($newlocation,$from.name)
```
```