• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 293
  • Last Modified:

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?
0
pfc_it
Asked:
pfc_it
  • 4
2 Solutions
 
pfc_itAuthor Commented:
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
0
 
pfc_itAuthor Commented:
get-aduser -filter {Department -eq "88"} | Set-ADUser -Department 89

This command worked.
0
 
pfc_itAuthor Commented:
get-aduser -filter {Department -eq "88"} | Set-ADUser -Department 89

This command worked.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now