Exchange Powershell commands that I use

Exchange PShell

Basic Cmdlets
Get-Mailbox
Lists mailboxes

Get-MailboxStatistics <Mailbox>
Details statistics of a particular mailbox

Get-Mailbox -OrganizationalUnit <OU name>

Get-Mailbox | Set-Mailbox -prohibitsendquota 500MB
String together 2 cmdlets sets prohibitsendquota to 500MB in all mailboxes

get-mailbox -OrganizationalUnit MIS | Set-mailbox -prohibitSendQuota 500MB

Get-MailboxDatabaseCopyStatus
This command gives the status of all databases on all mailbox servers.

Test-ReplicationHealth
This command run set of tests to test the replication health

Update-Recipient -Identity “Madeleine lastname”
Issue with move request

get-messagetrackinglog -start “02/14/2012 12:01 AM” -end “02/14/2012 11:59 PM” -recipients

Export DL group membership
Get-DistributionGroupMember -identity “testdl” | Export-Csv C:MyFile.Csv

Export inbox to .pst file for archiving – AD membership to domainnameMailbox Support required
New-MailboxExportRequest –Mailbox EXAMPLE –FilePath exchangeserverPSTFilesexample.pst
Get-MailboxExportRequest

Remove-MailboxExportRequest

Get-MailboxExportRequest -Status Completed | Remove-MailboxExportRequest

To allow user to send on a the behalf of distribution group,
Set-DistributionGroup “Wellness Team” -GrantSendOnBehalfTo cleffler, jporto
You must specify all users IDs that need the rights in one command Example: cleffer, jporto with that command.

New-DynamicDistributionGroup -Name GI_Staff -OrganizationalUnit domainname/domainname -RecipientFilter { ((RecipientType -eq ‘UserMailbox’) -and(Office -eq ‘St. Louis Gastroenterology’) -and (-not(title -eq ‘Physician’))) }

New-DynamicDistributionGroup -Name GI_Doctors -OrganizationalUnit domainname/name -RecipientFilter { ((RecipientType -eq ‘UserMailbox’) -and(Office -eq ‘St. Louis Gastroenterology’) -and(title -eq ‘Physician’)) }

Change location of Dynamic group to the proper OU in users and computers.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s