Skip to content

Instantly share code, notes, and snippets.

@tostka
Last active July 17, 2019 22:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tostka/fd91dfc2df1ce7c21c5b39a758b5319b to your computer and use it in GitHub Desktop.
Save tostka/fd91dfc2df1ce7c21c5b39a758b5319b to your computer and use it in GitHub Desktop.
Confirm :User has RemoteMailbox in OnPrem mail system
# Confirm User has RemoteMailbox in OnPrem mail system
# Note: Preconnect to onprem EX remote ps & EXO
# To differentiate targets, I prefix _EXO_ cmdlets with [verb]-exo[noun])
# on-prem cmdlets are _un-prefixed_
$tAddress = "UserUPN@DOMAIN.com" ;
# pull local recipient type
$rcp = get-recipient $tAddress ;
$rcp | ft -a alias, primar*, recipientt* ;
$rmbx = get-remotemailbox -id $rcp.PrimarySmtpAddress ;
$rmbx | format-table -auto Name, RecipientTypeD*, userprin* ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment