I have the following code:
$RecipientType = Get-Recipient $Name | Select-Object -Property RecipientType
if ($RecipientType.Equals("UserMailbox")) {
Write-Host "Mailbox is OnPrem"
}
I want to compare RecipientType value with string "UserMailbox", but it's not working...
.Equals(), and not-eq(or-ceqis you need case sensitive comparison)?SelectandSelect-Objectis the same cmdlet (Selectis just an alias)