Create Office365 mailbox:
Enable-RemoteMailbox %username% -RemoteRoutingAddress %username%@durhamtcc.mail.onmicrosoft.com
Size of an individual Mailbox
Get-MailboxStatistics "Tamara Johnston" | Format-List StorageLimitStatus,TotalItemSize,TotalDeletedItemSize,ItemCount,DeletedItemCount
List of emails
$members = Get-DynamicDistributionGroup -Identity "durhamtech"
Get-Recipient -ResultSize Unlimited -RecipientPreviewFilter $members.RecipientFilter | select Displayname,PrimarySmtpAddress > membersall.txt
Identifies personal mailbox from user
Get-MailboxPermission -Identity huntc@durhamtech.edu -User "townsendedadmin"
Create Distribution Group (with members)
New-DistributionGroup -Name "ITDepartment" -Members chris@contoso.com,michelle@contoso.com,laura@contoso.com,julia@contoso.com
Set-DistributionGroup -Identity Volunteers -ManagedBy john@contoso.com
Get a list of Distribution list
Get-DistributionGroup -Identity "Marketing Reports" | Format-List
Remove shared mailbox from user
Remove-MailboxPermission -Identity helpdesk -User townsendedadmin -AccessRights FullAccess -InheritanceType All
Remove-MailboxPermission -Identity helpdesk -User townsendedadmin -AccessRights SendAs -InheritanceType All
A way to remove a personal mailbox (doesn't seem to work all the time, but just in case.)
Add-MailboxPermission -Identity counseling -User townsendedadmin -AccessRights FullAccess -InheritanceType All -Automapping $false
Tip of the day #15:
To get a list of all users on an Exchange 2013 server who aren't Unified Messaging-enabled, type:
$Mailboxes = Get-Mailbox
$Mailboxes | ForEach { If($_.UmEnabled -Eq $False){$_.Name}}
Remove-UserPhoto "Ann Beebe"
List of Shared email accounts to csv
Get-Recipient -Resultsize unlimited | where {$_.RecipientTypeDetails -eq "SharedMailbox"} | ft Name,Manager >C:\temp\shared.csv
Get-MailboxPermission MailboxName |?{$_.AccessRights -like "*Fullaccess*"} | Select User,{$_.AccessRights} | Export-CSV C:\MailboxName.csv -nti
Shared Groups and who is in it
Get-DistributionGroup GroupA | Get-DistributionGroupMember -ResultSize Unlimited | Select DisplayName,PrimarySmtpAddress | Export-CSV C:\Group.csv -nti
Get-Mailbox -ResultSize Unlimited | Where-Object {$_.RecipientTypeDetails -eq "SharedMailbox"} | Get-MailboxPermission | Where-Object { $_.AccessRights -eq "FullAccess" }
Get-Recipient -Resultsize unlimited | Where-Object {$_.RecipientTypeDetails -eq "SharedMailbox"} | Get-MailboxPermission | Where-Object { $_.AccessRights -eq "FullAccess" } | ft Name,Manager >C:\temp\shared.csv
How to disable the email address policy for this mailbox, run the command with the EmailAddressPolicyEnabled parameter set to $false
Set-Mailbox domain\kellyn -PrimarySmtpAddress kellyl@domain.com -EmailAddressPolicyEnabled $false