Monday, July 16

Using Pipe in Exchange Management Shell

This session, we will learn about a subset of the users that match the criteria we enter – in this case, a name that is like max solution and anything (in other words, it starts with max solution). By the way, the $_.name means this object’s name. The where-object command goes through all objects and checks each one’s name against the criteria defined.

At the command prompt, type the following command, and then press ENTER:
get-user where-object {$_.name –ilike ″max solution*″}

In this command, we would like to have a result where users is not start with max solution.

At the command prompt, type the following command, and then press ENTER:
get-user where-object {$_.name –inotlike ″max solution*″}

To only get the users that have mailbox in Exchange, at the command prompt, type the following command, and then press ENTER:
get-user where-object {$_.recipienttype –eq ″mailboxuser″}

No comments: