Active directory powershell question (move users from various OU to one OU)
need active directory power shell script
i got csv file has active directory username, these users various sub ou's, need move these users ou run group policy on them.
i need script read username csv , move them 1 ou specify in script.
could help?
inderjit
i got working, in case if others looking same:
powershell content
------------------------
get-content “c:\scripts\users.csv” | % { get-aduser $_ | move-adobject -targetpath "ou=xx,dc=abc,dc=com"}
users.csv
--------------
cn=user1,ou=xx2,dc=abc,dc=com
inderjit
Windows Server > Windows PowerShell
Comments
Post a Comment