Get all instances of "user@domain.com" on an on-prem / Office365 environment
$path=[Environment]::GetFolderPath("Desktop")
Start-transcript $path\objects.txt
Get-OrganizationConfig | fl
Get-Msoluser -all | Where-Object {$_.UserPrincipalName -match "user@domain.com"}
Get-Msoluser -all | Where-Object {$_.Name -match "user@domain.com"}
Get-MsolUser -all | Where-Object {$_.ProxyAddresses -match "user@domain.com"}
Get-MsolUser -all | Where-Object {$_.WindowsLiveId -match "user@domain.com"}
Get-MsolContact -all | Where-Object {$_.UserPrincipalName -match "user@domain.com"}
Get-MsolContact -all | Where-Object {$_.Name -match "user@domain.com"}
Get-Msoluser -returndeletedusers -all | Where-Object {$_.UserPrincipalName -match "user@domain.com"}
Get-Msoluser -returndeletedusers -all | Where-Object {$_.Name -match "user@domain.com"}
Get-MsolUser -returndeletedusers -all | Where-Object {$_.ProxyAddresses -match "user@domain.com"}
Get-MsolUser -returndeletedusers -all | Where-Object {$_.WindowsLiveId -match "user@domain.com"}
Get-MsolGroup -all | Where-Object {$_.Name -match "user@domain.com"}
Get-MsolGroup -all | Where-Object {$_.EmailAddresses -match "user@domain.com"}
Get-DistributionGroup -ResultSize unlimited | Where-Object {$_.Name -match "user@domain.com"}
Get-DistributionGroup -ResultSize unlimited | Where-Object {$_.EmailAddresses -match "user@domain.com"}
Get-DynamicDistributionGroup -ResultSize unlimited | Where-Object {$_.Name -match "user@domain.com"}
Get-DynamicDistributionGroup -ResultSize unlimited | Where-Object {$_.EmailAddresses -match "user@domain.com"}
Get-UnifiedGroup -ResultSize unlimited | Where-Object {$_.Name -match "user@domain.com"}
Get-UnifiedGroup -ResultSize unlimited | Where-Object {$_.EmailAddresses -match "user@domain.com"}
Get-Recipient -ResultSize unlimited | Where-Object {$_.Name -match "user@domain.com"}
Get-Recipient -ResultSize unlimited | Where-Object {$_.EmailAddresses -match "user@domain.com"}
Get-MailContact -ResultSize unlimited | Where-Object {$_.Name -match "user@domain.com"}
Get-MailContact -ResultSize unlimited | Where-Object {$_.EmailAddresses -match "user@domain.com"}
Get-MailUser -ResultSize unlimited | Where-Object {$_.Name -match "user@domain.com"}
Get-MailUser -ResultSize unlimited | Where-Object {$_.EmailAddresses -match "user@domain.com"}
Get-User -ResultSize unlimited | Where-Object {$_.Name -match "user@domain.com"}
Get-User -ResultSize unlimited | Where-Object {$_.EmailAddresses -match "user@domain.com"}
Get-Mailbox -ResultSize unlimited | Where-Object {$_.Name -match "user@domain.com"}
Get-Mailbox -ResultSize unlimited | Where-Object {$_.EmailAddresses -match "user@domain.com"}
Get-Mailbox -Softdeleted -ResultSize unlimited | Where-Object {$_.Name -match "user@domain.com"}
Get-Mailbox -Softdeleted -ResultSize unlimited | Where-Object {$_.EmailAddresses -match "user@domain.com"}
Get-Mailbox -InactiveMailboxOnly -ResultSize unlimited | Where-Object {$_.Name -match "user@domain.com"}
Get-Mailbox -InactiveMailboxOnly -ResultSize unlimited | Where-Object {$_.EmailAddresses -match "user@domain.com"}
Get-Mailbox -PublicFolder -ResultSize unlimited | Where-Object {$_.Name -match "user@domain.com"}
Get-Mailbox -PublicFolder -ResultSize unlimited | Where-Object {$_.EmailAddresses -match "user@domain.com"}
Get-MailPublicFolder -ResultSize unlimited | Where-Object {$_.Name -match "user@domain.com"}
Get-MailPublicFolder -ResultSize unlimited | Where-Object {$_.EmailAddresses -match "user@domain.com"}
Get-SiteMailbox -ResultSize unlimited | Where-Object {$_.Name -match "user@domain.com"}
Get-Sitemailbox -ResultSize unlimited | Where-Object {$_.EmailAddresses -match "user@domain.com"}
Get-securityprincipal -ResultSize unlimited | Where-Object {$_.EmailAddresses -match "user@domain.com"}
Get-securityprincipal -ResultSize unlimited | Where-Object {$_.Name -match "user@domain.com"}
Stop-transcript