Mailbox server “Servername” is a member of cluster. The server must be evicted from the cluster prior to adding it to database availability group “DAGName”

Scenario:  You receive the following error when attempting to join a Mailbox server to a new DAG after removing the server from a old DAG:

Mailbox server “Servername” is a member of cluster. The server must be evicted from the cluster prior to adding it to database availability group “DAGName”

Solution:

Run Get-databaseavailabilitygroup and verify that the server is not a member of an existing DAG.  If it is, run the following:

remove-databaseavailabilitygroupserver <Servername>

You may have to use the –configurationonly switch if it doesn’t remove the server properly.

If that does not work,  remote into the server that is having the issue and run the following:

Remove-clusternode <servername>

Need to recreate Arbitration Mailboxes as they are no longer available

Scenario:  You have arbitration mailboxes that are located on databases that are no longer accessible.   Although the mailbox is no longer accessible, the AD User account is still in tact.

Solution:  Disable and re-enable the arbitration mailboxes.  The Database DB04 is where the arbitration mailboxes lived but DB04 is gone.

Set-adserversettings -viewentireforest:$true

$1 = get-mailbox -arbitration | Where Database -like DB04 

$1 | Disable-mailbox -confirm:$false

$1 | Enable-mailbox

The Error: Couldn’t disable the arbitration mailbox because it is associated with existing recipients for which membership restriction of approval is required or the moderation feature is enabled. Please disable the approval feature on those recipients before performing this operation.

Scenario:  You receive the following error when trying to disable/remove an arbitration mailbox:

Couldn’t disable the arbitration mailbox because it is associated with existing recipients for which membership restriction of approval is required or the moderation feature is enabled. Please disable the approval feature on those recipients before performing this operation.

Solution:  Locate the distribution groups that are using this arbitration mailbox.  You will be able to transfer the arbitration mailbox used by the distribution groups if you have another.

Get-distributiongroup  | Select Name, ArbitrationMailbox

OR

Get-distributionGroup | Where ArbitationMailbox -like “Domain.Com/Users/SystemMailbox{149831f20381-30d4-ed31-1345defe2313”

You can use the opposite to set it to the new Arbitation mailbox:

set-distributiongroup -identity “name of Distribution Group” -arbitrationmailbox “name of Arbitration Mailbox”

Perform an NSLookup in PowerShell to find the IP Address(es) tied to a hostname

Scenario:  You want to perform an NSLookup in PowerShell so you can use the multiple IP addresses that you are using for DNS Round Robin in another PowerShell Query.

Solution: Run the following:

#Collect the IP Addresses of the hostname into a variable
$address = [system.net.dns]::GetHostAddresses("mail.domain.com" | Select IPAddressToString)

#For Each Loop it with a command
$address | Select -expandproperty IPAddressToString | %{ Get-ADComputer $_ }

 

Error “A reboot from a previous installation is pending” during Exchange InstallUninstall

Scenario:  When attempting to install/uninstall Exchange, you receive the following error during readiness checks:

“A reboot from a previous installation is pending”

Even after a reboot, it doesn’t clear this error.

Solution:

  1. Clear values out of the PendingFileRenameOperations key located at: HKLMSYSTEMCurrentControlSetControlSessionManagerPendingFileRenameOperations
  2. You may need to clear out the content of this key as well located at: HKLMSystemControlSet001ControlSessionManager

Determine which Windows Management Framework is installed in PowerShell

Scenario: You want to easily detect which Windows Management Framework is installed on your server.

Solution:

Run either in Powershell

host  | Select Version

OR

$PSVersionTable.PSVersion 

 

Determine TTL on a DNS record

Scenario:  You changed an IP address on a DNS record and you want to determine the TTL (Time to Live) value of the DNS record to figure out when this DNS record will become refreshed.

Solution: Run the following NSLookup command with the -type=soa record against the DNS name you wish to determine TTL.

nslookup -type=soa http://www.google.com

 

MSexchangeHMWo restarted server

Scenario:  A Exchange 2013 Server rebooted on its own.  After reading the memory dump file, you see the information below.  We need to determine what caused this and how to prevent a reboot.

ModuleName: wininit.exe

Process_Name: MSexchangeHMWo

Default_Bucket_ID:    WIN8_Driver_Fault_Server

Solution: We know that Exchange’s Health Manager rebooted the server for us automatically, but why?   First we need to figure out which responder did this.  On the server that rebooted, run the following Powershell:

$1 = (Get-WinEvent -LogName Microsoft-Exchange-ManagedAvailability/* | % {[XML]$_.toXml()}).event.userData.eventXml| ?{$_.ActionID -like “*ForceReboot*”}

$1 | Select ActionID,RequesterName

Now that we have the requestername, you can choose to troubleshoot the requester and put in a global monitor override so it does not restart the server anymore.  In our scenario,  ServiceHealthActiveManagerForceReboot was the responder that rebooted our servers so we applied one of the following Global Monitoring Overrides to prevent the reboot.

Add-GlobalMonitoringOverride -Identity ExchangeServiceHealthActiveManagerForceReboot -ItemType Responder -PropertyName Enabled -PropertyValue 0 -ApplyVersion 15.00.1210.003

OR

Add-GlobalMonitoringOverride -Identity ExchangeServiceHealthActiveManagerForceReboot -ItemType Responder -PropertyName Enabled -PropertyValue 0 -duration 60.00:00:00