Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

How to move bulk AD Groups between OU's

$
0
0

Hi Everyone,

I would like to move over 50 AD Groups between OU's and stamp the notes box with a comment. 

I am having trouble with the move to start of, this is the script I found:

$Move=import-csv D:\Temp\Em_Groups.csv
Import-module ActiveDirectory
foreach ($Group in $Groups){
    get-adgroup $Group|move-adobject -targetpath "OU=Cleanup,OU=Disabled Accounts,DC=blue,DC=net"
}

The script is not working (not moving the groups to new OU).

Any ideas please?

M


Maelito


Viewing all articles
Browse latest Browse all 21975

Trending Articles