Skip to content

Microsoft Exchange Server 2013 – Disable Mailbox Script

You may use the script below, in the Exchange Management Shell, to disable a Microsoft Exchange Server 2013 mailbox using the Microsoft Active Directory display name.

<#
.SYNOPSIS
This script will disable the Microsoft Exchange Server 2013 mailbox of the specified user using their Microsoft Active Directory display name.
.DESCRIPTION
This script will automate the disabling of a Microsoft Exchange Server 2013 mailbox.
.EXAMPLE
N/A.
.AUTHOR
Written by Noel Enrique Alvarez on Wednesday, July 27, 2016.
#>

#Request the user’s Microsoft Active Directory display name
$User = Read-Host “What is the user’s Microsoft Active Directory display name?”

#Disable the Microsoft Exchange Server 2013 mailbox
Disable-Mailbox -Identity “$User”

Published inAutomationMicrosoft Exchange Server 2013Microsoft Windows PowerShellScripting

Comments are closed.