Basic Exchange Database CMDLETS

Get ALL Databases and Active Preference information NEAT
Get-MailboxDatabase | Sort Name | Select Name, ActivationPreference

Get All databases and Activation Preference information
Get-MailboxDatabase | ft name, server, activationpreference -AutoSize

Get Specific databases and Activation Preference information
Get-MailboxDatabase -Identity ‘EX10mbx12’ | fl name, server, activationpreference

Set or Move Active Database
Move-ActiveMailboxDatabase -Identity ‘EX10mbx22’ -ActivateOnServer ‘EX1004’ -MountDialOverride ‘None’

Get Local Database Status
Get-MailboxDatabaseCopyStatus -Local | fl DatabaseName, ContentIndexState, ActiveCopy

Move Database Path
Move-DatabasePath -Identity EX10mbx19 -EdbFilePath E:dbEX10mbx19.edb

Check the Mount Status of a Mailbox Database
Get-MailboxDatabase -status | fl Name,Mounted

Database Mounted Status
Get-MailboxDatabase -Status | Select Name, Server, Mounted

Dismount a Mailbox Database
Dismount-Database “EX10mbx19”

Export All Users in the database
Get-Mailbox -Database EX10mbx01 -ResultSize Unlimited > c:dameexport1.txt

Get Exchange Database Size (exch 2010)
Get-MailboxDatabase -Status | select ServerName,Name,DatabaseSize

Get Exchange Database Size (exch 2007)
Get-MailboxDatabase | foreach-object {add-member -inputobject $_ -membertype noteproperty -name mailboxdbsizeinGB -value ([math]::Round(([int64](get-wmiobject cim_datafile -computername $_.server -filter (‘name=”’ + $_.edbfilepath.pathname.replace(“”,”\”) + ””)).filesize / 1GB),2)) -passthru} | Sort-Object mailboxdbsizeinGB -Descending | format-table identity,mailboxdbsizeinGB

Get All Users in specific Mailbox Database like 2003 View
Get-MailboxStatistics -Database “Mailbox Database” | Sort -Property TotalItemsize | Format-Table DisplayName, LastLoggedOnUserAccount, ItemCount, @{expression={$_.totalitemsize.value.ToMB()};label=”Size(MB)”}, LastLogonTime, LastLogoffTime

Please feel free to share.

Related News

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyrıght 2013 FUEL THEMES. All RIGHTS RESERVED.

Enjoy this blog? Please spread the word :)