Users
Get-MsolUser -UserPrincipalName xxxx
Groups
Get-Group -Identity xxxx
Get-DistributionGroup -Identity xxxx
Remove-UnifiedGroup -Identity
Set-DistributionGroup –Identity domain.com/OU1/OU2/OU3/group-name -AcceptMessagesOnlyFromSendersOrMembers((Get-DistributionGroup -identity domain.com/OU1/OU2/OU3/group-name).AcceptMessagesOnlyFromSendersOrMembers + “group-name@domain.com“)
Set-DistributionGroup -Identity domain.com/OU1/OU2/OU3/group-name -RequireSenderAuthenticationEnabled $true
Azure AD Sync
(Get-MSOLCompanyInformation).DirectorySynchronizationEnabled
Set-MsolDirSyncEnabled –EnableDirSync $true
Set-MsolDirSyncEnabled –EnableDirSync $false
To run form domain controller where ADSync is installed:
Start-ADSyncSyncCycle -PolicyType delta
Start-ADSyncSyncCycle -PolicyType initial
Mailbox
Get-Mailbox user@domain.com
Get-MailboxStatistics user@domain.com
Get-MailboxPermission user@domain.com | where {$_.isInherited -eq $false}
Get-RecipientPermission -Identity user@domain.com
Get-Mailbox -SoftDeletedMailbox -ResultSize Unlimited