A quck reference for some common commands:

Export to PST

Export-Mailbox –Identity <mailboxUser> -PSTFolderPath <pathToSavePST>

Mailbox Size

Get-MailboxStatistics | ft displayname,totalitemsize,lastlogontime

Mailbox Size – Sorted by Size Descending

Get-MailboxStatistics | Sort-Object -Descending TotalItemSize | ft displayname,totalitemsize,lastlogontime

Create a new mailbox-enabled user
new-Mailbox -alias testmbx -name TestMailbox -database “Mailbox Database” -org Users -UserPrincipalName testmbx@example.com
Password: <userpassword>
Create a new resource mailbox (Conference Room or Equipment)
New-Mailbox -alias testresmbx -name TestResourceMailbox -database “Mailbox Database” -org Users <-Room | -Equipment>  -UserPrincipalName testresourcembx@example.com

Create a shared mailbox
new-Mailbox -alias testsharedmbx -name TestSharedMailbox -database “Mailbox Database” -org Users -shared -UserPrincipalName testsharedmbx@example.com

Create a new linked mailbox
New-Mailbox -alias testlinkedmbx -name TestLinkedMailbox -database “Mailbox Database” -org Users -LinkedMasterAccount account@userdomain.com -LinkedDomainController userdomain-dc-01 -UserPrincipalName testmbx@example.com

Mail-enable an existing user as a user mailbox
Enable-Mailbox logondisableduser -database “Mailbox Database”

Mail-enable an existing (AD logon-disabled) user as a resource mailbox (Conference Room or Equipment)
Enable-Mailbox logondisableduser <-Room | -Equipment> -database “Mailbox Database”

Mail-enable an existing (AD logon-disabled) user as a linked mailbox
Enable-Mailbox logondisableduser -database “Mailbox Database” -LinkedMasterAccount account@userdomain.com -LinkedDomainController userdomain-dc-01

Move an individual mailbox
Move-Mailbox testmbx -targetdatabase “Mailbox Database”

Move all mailboxes stored on a server to a target mailbox database
Get-Mailbox -server testserver | Move-Mailbox -targetdatabase “Mailbox Database”

Disable one individual mailbox
Disable-Mailbox testmbx

Disable all mailboxes stored on a server
Get-Mailbox -server testserver | Disable-Mailbox

Remove one individual mailbox-enabled user
Remove-Mailbox testmbx

Remove all mailbox-enabled users stored on a server
Get-Mailbox -server testserver | Remove-Mailbox

Set storage quotas
Set-Mailbox testmbx -UseDatabaseQuotaDefaults:$False -IssueWarningQuota 90MB -ProhibitSendQuota 95MB -ProhibitSendReceiveQuota 100MB

Set a mailbox to forward mail to another recipient and recipients limits
Set-Mailbox testmbx -DeliverToMailboxAndForward:$True -ForwardingAddress jaredz@example.com -RecipientLimits 10

Grant “Send on behalf” permission
Set-Mailbox testmbx -GrantSendOnBehalfTo jaredz

Grant “Send-As” permission
Add-ADPermission testmbx -ExtendedRights Send-As -user jaredz

Grant full mailbox access permission
Add-MailboxPermission testmbx -AccessRights FullAccess -user jaredz

Get Log Files Paths

Get-StorageGroup -server <servername>| fl *path*

Mailbox Database Path

Get-MailboxDatabase -server <servername>| fl *path*

Public Folder Database

Get-PublicFolderDatabase -server <servername>| fl *path*

Log Paths

Get-MailboxServer <servername>| fl *path*

 

You must be logged in to leave a reply.