Start-EaiDAGMaintenanceMode

Module: Exchange_AddIn
Applies to: Exchange Server 2010, Exchange Server 2013, Exchange Server 2016, Exchange Server 2019

Use the Start-EaiDAGMaintenanceMode function to place an Exchange server into maintenance mode to be able to properly perform updates and/or reboots on an Exchange Server.

Start-EaiDAGMaintenanceMode

SYNOPSIS

Function to put an Exchange 2010/2013/2016/2019 Server into Maintenance Mode.

Credits:

Exchange Server 2013 Maintenance Mode Script (Start):
https://gallery.technet.microsoft.com/exchange/Exchange-Server-2013-ff6c942f

Checking for admin credentials:
http://blogs.technet.com/b/heyscriptingguy/archive/2011/05/11/check-for-admin-credentials-in-a-powershell-script.aspx

SYNTAX

Start-EaiDAGMaintenanceMode [-Server] <String> [[-TargetServerFQDN] <String>] [<CommonParameters>]

DESCRIPTION

This function is created to automatically put an Exchange 2013/2016 Server into Maintenance Mode.
It will detect if the server is a Mailbox Server and then take appropriate additional actions, if any.

EXAMPLES

EXAMPLE 1

Running the following command will place a server called "Server1" into Maintenance Mode.

Start-EaiExchangeServerMaintenanceMode -Server Server1

EXAMPLE 2

Running the following command will place a server called "Server1" into Maintenance Mode and move any messages in transit from that server to "Server2".

Please note that the TargetServer value has to be a FQDN!

Start-EaiExchangeServerMaintenanceMode -Server Server1 -TargetServerFQDN Server2.domain.com

PARAMETERS

-Server

determine what server to put in maintenance mode

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-TargetServerFQDN

{{ Fill TargetServerFQDN Description }}

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: $Server
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Amazon Affiliate

As you make purchases from Amazon, consider clicking my link first, then purchase items as you normally would. This helps support my blogging efforts, and it costs you nothing. Simply click the Amazon link and complete your ordinary shopping tasks. Thank you.

Disclosure: As an Amazon Associate, I earn a small commission from qualifying purchases made through the links in this post, at no extra cost to you. This helps support the blog!