Commands › Exchange Online

Set-UMMailboxPIN

Exchange Online ExchangeOnlineManagement Set-*

Reset the PIN for a Unified Messaging (UM)-enabled mailbox.

Quick start script

# Set-UMMailboxPIN — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org

# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-UMMailboxPIN
$before | Format-List

# 3. Make the change (dry run first)
Set-UMMailboxPIN -Identity <MailboxIdParameter> -WhatIf
Set-UMMailboxPIN -Identity <MailboxIdParameter>

# 4. Verify and diff
$after = Get-UMMailboxPIN
Compare-Object ($before | Out-String) ($after | Out-String)

Syntax

Set-UMMailboxPIN [-Identity] <MailboxIdParameter>
 [-Confirm]
 [-DomainController <Fqdn>]
 [-IgnoreDefaultScope]
 [-LockedOut <Boolean>]
 [-NotifyEmail <String>]
 [-Pin <String>]
 [-PINExpired <Boolean>]
 [-SendEmail <Boolean>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (11)

ParameterTypeRequiredWhat it controls
-Identity MailboxIdParameter yes The Identity parameter specifies the mailbox that you want to modify. You can use any value that uniquely identifies the mailbox. For example:
-Confirm SwitchParameter The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on whether the cmdlet requires confirmation before proceeding.
-DomainController Fqdn The DomainController parameter specifies the domain controller that's used by this cmdlet to read data from or write data to Active Directory. You identify the domain controller by its fully qualified domain name...
-IgnoreDefaultScope SwitchParameter The IgnoreDefaultScope switch tells the command to ignore the default recipient scope setting for the Exchange PowerShell session, and to use the entire forest as the scope. You don't need to specify a value with this switch.
-LockedOut Boolean The LockedOut parameter specifies whether the mailbox is locked out of UM. Valid values are:
-NotifyEmail String The NotifyEmail parameter specifies the email address to which the server sends the email message that contains the PIN reset information. By default, the message is sent to the SMTP address of the enabled user.
-Pin String The Pin parameter specifies a new PIN for use with the mailbox. The PIN is checked against the PIN rules defined in the Unified Messaging mailbox policy. If the PIN isn't supplied, the command generates a new PIN for...
-PINExpired Boolean The PINExpired parameter specifies whether the PIN is treated as expired. If this parameter is supplied and is set to $false, the user isn't required to reset the PIN the next time that the user logs on. If the PIN...
-SendEmail Boolean The SendEmail parameter specifies whether to send a PIN to the user in an email message. The default is $true.
-WhatIf SwitchParameter The WhatIf switch shows what the command does without making any changes. You don't need to specify a value with this switch.
-PINExpired Boolean The PINExpired parameter specifies whether the PIN is treated as expired. If this parameter is supplied and is set to $false, the user isn't required to reset the PIN the next time that the user logs on. If the PIN...

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.