Link to home
Start Free TrialLog in
Avatar of pfc_it
pfc_itFlag for United States of America

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?
ASKER CERTIFIED SOLUTION
Avatar of Seaton007
Seaton007
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pfc_it

ASKER

I get the following.

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
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pfc_it

ASKER

get-aduser -filter {Department -eq "88"} | Set-ADUser -Department 89

This command worked.