July 2017
Intermediate to advanced
648 pages
31h 9m
English
Alternatively, we could have used the Get-Mailbox cmdlet instead, but it wouldn't be as straightforward or as fast. For each mailbox, we would have to get its PrimarySmtpAddress and then look into the EmailAddresses property and retrieve the entry with a PrefixString equal to sip in order to get the user's SIP address. Once we have these two values, we can compare them to see whether they match or not.
The end result would be the following script:
[String] $strPrimaryAddress = $strSIP = $null[Array] $mbxCol = @() Get-Mailbox -ResultSize Unlimited | ForEach { $strSIP = $NULL $strPrimaryAddress = $_.PrimarySmtpAddress $_.EmailAddresses | ForEach {If ($_.PrefixString -eq "sip") {$strSIP = $_.AddressString}} If ($strSIP -and ...Read now
Unlock full access