You could add in your SWITCH ($Member.RecipientType)... {($_ -eq "UserMailbox") -or ($_ -eq "Mailuser")} { To include both cases of Onprem Mailboxes (Mailuser) vs O365 Mailboxes (UserMailbox) Also you could add a default case for new cases that are not being handled.