Wednesday, October 12, 2011

Important Exchange PowerShell Commands

Without knowing Exchange PowerShell commands it is quite difficult to administer Exchange. So following are the few important PowerShell commands.
To start with I will add few but will be adding many more commands in coming days.

About DAG:
  • How to view the information about DAG including the names of the servers in DAG, current active manger and witness directory:
            Get-DatabaseAvailabilityGroup  –Identity   “<DAGname>”   -status  |  Format-List
  • Remember that dismounting an active database is not a failover.
  • How to know if the active database and passive database are replicated properly or not and how to check the status of the static snapshot
            Get-MailboxDatabaseCopyStatus   -Identity  <Mailboxname> (not the server  name)
About CAS Array: 
  • Find the name of the CAS Array/Server name specific to a Mailbox
            Get-mailboxdatabase      <databasename>     |    fl     rpcclientaccessserver
  • Creating a CAS Array:
            New-ClientAccessArray –Name ‘<array name>’ -FQDN “<CasArrayName> ” -Site ‘<sitename>’
  • Setting the mailbox to a CAS Array
            Set-Mailboxdatabase -Identity ‘<databasename>’ -RPCClientAccessServer ‘<CASArrayname>’

  • Finding all the CAS arrays in Exchange organization
            Get-ClientAccessArray
About HT:
  • Find all the exchange servers and their Sites information
            Get-ExchangeServer | Select  Name,  Site

No comments:

Post a Comment