pfc_it
asked on
Exchange 2010 Change Departments
Hello,
I can query a list of users in PowerShell, Get-User -Filter "Department -eq '88'", but how do I update to a new Department for all users with 88 to 89?
I can query a list of users in PowerShell, Get-User -Filter "Department -eq '88'", but how do I update to a new Department for all users with 88 to 89?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I followed this to make it work.
http://www.mikepfeiffer.net/2010/01/how-to-install-the-active-directory-module-for-windows-powershell/
http://www.mikepfeiffer.net/2010/01/how-to-install-the-active-directory-module-for-windows-powershell/
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
get-aduser -filter {Department -eq "88"} | Set-ADUser -Department 89
This command worked.
This command worked.
ASKER
get-aduser -filter {Department -eq "88"}
The term 'get-aduser' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:11
+ get-aduser <<<< -filter {Department -eq "88"}
+ CategoryInfo : ObjectNotFound: (get-aduser:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException