Advertisement
jheinrichs79

Untitled

Oct 23rd, 2019
481
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #Connect to Exchange online
  2. #jared.heinrichs@domain.com exists.
  3.  
  4. #If I type:
  5. get-recipient -filter {emailaddresses -like "*jared.heinrichs@domain.com*"}
  6. <#
  7. =============================================================
  8. It returns
  9. Name            RecipientType
  10. ----            -------------
  11. Jared Heinrichs UserMailbox  
  12. =============================================================
  13. #>
  14.  
  15. $MigratedEmailAddress = "jared.heinrichs@domain.com"
  16. get-recipient -filter {"emailaddresses -like '*'$MigratedEmailAddress'*"}
  17. <#
  18. =============================================================
  19. Cannot bind parameter 'Filter' to the target. Exception setting "Filter": "Invalid filter syntax. For a description of the
  20. filter parameter syntax see the command help.
  21. ""emailaddresses -like '*'$MigratedEmailAddress'*"" at position 1."
  22. At C:\Users\********\AppData\Local\Temp\tmp_wc1ehair.2xn\tmp_wc1ehair.2xn.psm1:28581 char:9
  23. +         $steppablePipeline.End()
  24. +         ~~~~~~~~~~~~~~~~~~~~~~~~
  25.     + CategoryInfo          : WriteError: (:) [Get-Recipient], ParameterBindingException
  26.     + FullyQualifiedErrorId : ParameterBindingFailed,Microsoft.Exchange.Management.RecipientTasks.GetRecipient
  27.  
  28. =============================================================
  29. #>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement