July 2017
Intermediate to advanced
648 pages
31h 9m
English
One of the issues you may run into when working in the shell is the expansion of variables used within a filter. For example, this syntax is completely valid, but will not currently work correctly in the Exchange Management Shell:
$office = "sales"
Get-Mailbox -Filter {Office -eq $office}
You might get some results from this command, but they will probably not be what you are expecting. This is because, when running the Get-Mailbox cmdlet, the value of the $office variable will not be expanded prior to the command being executed through the remote shell. What you end up with instead is a filter checking for a $null value. In order to fix this, you'll need to use syntax similar to the following:
$office ...Read now
Unlock full access