Thursday, 12 December 2013

MS Exchange 2010 Mailbox Management PowerShell

Exchange 2010 Mailbox Management PowerShell



Disable

Disable-Mailbox -identity "user one"

Disable Archive

Disable-Mailbox -identity "user one" -Archive

Disable Remote Archive

Disable-Mailbox -identity "user one" -RemoteArchive

Remove

Remove-Mailbox -identity "user one"
Remove-Mailbox -identity "user one" -Permanent

Enable Unified Messaging...

To enable UM service on a mailbox, this has to be first set up.
PowerShell Command to use: Enable-UMMailbox

Manage Mobile Phone...

To get the details...
Get-ActiveSyncDeviceStatistics -Mailbox user.one | fl identity

To cancel the partnership...
Remove-ActiveSyncDevice -identity user.one_iphone

To perform a remote wipe...
Clear-ActiveSyncDevice -identity user.one_iphone

Clear-MobileDevice -identity user.one_iphone -NotificationEmailAddresses "admin@mydomain.com"

New Local Move Request...

New-MoveRequest -identity "user one" -TargetDatabase MBdb02
New-MoveRequest -identity "user two" -TargetDatabase MBdb02 -PrimaryOnly
New-MoveRequest -identity "user three" -ArchiveTargetDatabase MBdb03 -ArchiveOnly
New-MoveRequest -identity "user four" -TargetDatabase MBdb02 -ArchiveTargetDatabase MBdb03

New Remote Move Request...

$MyCred = Get-Credential
New-MoveRequest -identity user.one@mydomain.com -Remote -TargetDatabase MSMBdb02 -RemoteHostName "hostedcas01.mydomain.com" -RemoteCredential $MyCred -TargetDeliveryDomain "hostedmail.onmicrosoft.com"

Manage Send As Permission

Add-ADPermission –identity "user one" –user "user two" –ExtendedRights “Send As”

Manage Full Access Permission

Add-MailboxPermission -identity "user one" -User "user two" -AccessRights FullAccess

If you don't want to map the mailbox on the "user two" outlook, set the automapping value to false. By default it is set to true. Any mailbox you give full access permission will appear as another inbox under user own inbox in Outlook 2010 or later version.

Add-MailboxPermission -identity "user one" -User "user two" -AccessRights FullAccess -InheritanceType All -Automapping $false


Send Mail

When you click on ‘Send Mail’ button on the pop up Menu, the exchange server will look for the email client software such as Microsoft Outlook 2010 on the server. If there is one installed you will be able to use it. If not, use the following command to send an email.

Send-MailMessage -From "user.one@mydomain.com" -To "user.two@mydomain.com" -Cc "group.one@mydomain.com" -Bcc "user.three@mydomain.com" -Subject "Mailbox Statistics" -Attachments "C:\temp\Report.csv" -Priority High -Body "This is the Exchange Server Mailbox usage report I have promised."


Properties

Get-Mailbox and Get-mailboxStatistics can be used to get the necessary information about the mailbox in question. For example,

Get-Mailbox -identity "user one" | fl
Get-MailboxStatistics -identity "user one" | fl

No comments:

Post a Comment