PowerShell Set-ExchangeServer

Set-ExchangeServer For Exchange 2010

This PowerShell cmdlet is for changing Exchange Server 2010 attributes in Active Directory; for example, static global catalog or error reporting.

 ♣

Getting Started with Set-ExchangeServer

Set-ExchangeServer is looking for the identity of a named server, you cannot change lots of servers without introducing a PowerShell loop construction.

Set-ExchangeServer -Identity YourServer

Note 1: Set-ExchangeServer -Identity YourServer does not change anything unless you add a parameter such as StaticGlobalCatalogs.

Adding useful parameters

Set-ExchangeServer -Identity SrvExch -StaticGlobalCatalogs:$Null

Note 2: If -Identity is the first parameter it can be ‘assumed’, and thus truncated to:

Set-ExchangeServer SrvExch -StaticGlobalCatalogs:$Null

List the Set-ExchangeServer Parameters

Let us employ PowerShell’s internal help to research more parameters:

Get-Help Set-ExchangeServer

PowerShell’s own help reveals parameters such as: StaticGlobalCatalogs, StaticDomainControllers, and ErrorReportingEnabled.

Free Download of Exchange Monitor from SolarWindsGuy Recommends: The SolarWinds Exchange Monitor

Here is a free tool to monitor your Exchange Server.  Download and install the utility, then inspect your mail queues, monitor the Exchange server’s memory, confirm there is enough disk space, and check the CPU utilization.

This is the real deal – there is no catch.  SolarWinds provides this fully-functioning freebie, as part of their commitment to supporting the network management community.

Free Download of SolarWinds Exchange Monitor

Examples of Set-ExchangeServer in Action

In the scenario where you don’t want your Exchange Server to use a particular domain controller, you could issue this command from PowerShell

Set-ExchangeServer -Identity exchsrv01 -StaticExcludedDomainControllers adserv02.yourdom.com

Example To Configure Exchange Server for AD and GCS

Here is a command to ‘wire-up’ an Exchange 2010 server to a specific domain controller and global catalog server using Set-ExchangeServer parameters.

Set-ExchangeServer -Identity exchsrv01 -StaticConfigDomainController adserv02.yourdom.com  -StaticDomainControllers adserv02.yourdom.com  -StaticGlobalCatalogs gcserv03.yourdom.com

Note 3: In real-life it is best to add multiple DC or GC servers thus providing resilience if one of the Active Directory servers is down.

Note 4: You can reverse these commands by using $Null, for example, StaticDomainControllers $Null.

Note 5: See more on PowerShell’s Set-ExchangeServer.

Example To Configure Exchange Server Error Reporting

Here is a PowerShell command to control whether, or not, you wish to enable Microsoft Event Reporting, and Automatic Error Reporting.

Set-ExchangeServer -Identity exchsrvNew – ErrorReportingEnabled:$true 

Note 6: You can reverse this command by using the $false.

Guy Recommends:  A Free Trial of the Network Performance Monitor (NPM)Review of Orion NPM v11.5 v11.5

SolarWinds’ Network Performance Monitor will help you discover what’s happening on your network.  This utility will also guide you through troubleshooting; the dashboard will indicate whether the root cause is a broken link, faulty equipment or resource overload.

What I like best is the way NPM suggests solutions to network problems.  Its also has the ability to monitor the health of individual VMware virtual machines.  If you are interested in troubleshooting, and creating network maps, then I recommend that you try NPM now.

Download a free trial of SolarWinds’ Network Performance Monitor

Checking with Get-ExchangeServer

Try before and after experiments with Get-ExchangeServer, please note the -Status switch for real-time data.

Get-ExchangeServer -Identity exchsrv01 -Status | Format-List

Summary of Set-ExchangeServer

This PowerShell cmdlet is for changing Exchange Server 2010 attributes in Active Directory; for example, static global catalog or error reporting.  Set-ExchangeServer does nothing unless you add a parameter such as StaticGlobalCatalogs.

If you like this page then please share it with your friends

 


See more PowerShell Cmdlets for Exchange 2010:

Exchange 2010 Home   • Enable-Mailbox   • Disable-Mailbox   • New-Mailbox   • Set-Mailbox

Get-Mailbox   • Get-MailboxStatistics   • Connect-Mailbox   • Export-Mailbox   • Import-Mailbox

Exchange 2010 PowerShell commands   • Get-ExchangeServer   • Get-MailboxDatabase

Please write in if you see errors of any kind.  Please report any factual mistakes, grammatical errors or broken links, I will be happy to not only to correct the fault, but also to give you credit.