Forum Discussion
Create single temporary voicemail for all Teams Voice users
I need to create a single temporary voicemail for all Teams Voice users for the Xmas break.
Can someone please help with setting this up with best practice?
This voicemail message has already been setup for a main phone number IVR using an Auto Attendant.
1 Reply
- Mks_1973Iron Contributor
Since you already have the Christmas voicemail message set up for your main IVR (Auto Attendant), you can reuse it for all Teams Voice users with minimal configuration.
To ensure all users hear the same voicemail message, forward incoming calls to the Auto Attendant configured with the temporary voicemail.Sign in to Teams Admin Center:
Go to Microsoft Teams Admin Center.
Access Users Configuration:Navigate to Users → Manage Users.
Edit Call Forwarding Rules:For each user (or in bulk, if possible), configure the following:
Go to Voice → Call forwarding and simultaneous ringing.
Set Forward all calls to the Auto Attendant configured for the Christmas break voicemail.
Example( Forward to: Auto Attendant Name )
Ensure the Auto Attendant is already set up to play the voicemail.
Use a PowerShell script to bulk update call forwarding rules for all Teams Voice users (see script below).
Install and connect to Teams PowerShell:
Install-Module -Name PowerShellGet -Force
Install-Module -Name MicrosoftTeams -Force
Import-Module MicrosoftTeams
Connect-MicrosoftTeams
PowerShell Script to Forward Calls to Auto Attendant:
# Connect to Microsoft Teams
Connect-MicrosoftTeams# Get all Teams Voice users
$TeamsUsers = Get-CsOnlineUser -Filter {TeamsVoiceEnabled -eq $true}# Set call forwarding for all users
foreach ($user in $TeamsUsers) {
Set-CsUserCallingSettings -Identity $user.UserPrincipalName `
-ForwardingType Always `
-ForwardingTarget "sip:<AutoAttendantName>@domain.com"
}Write-Host "Call forwarding configured for all Teams Voice users."
(Replace <AutoAttendantName> with the name or number of your Auto Attendant.)Please verify that the Auto Attendant you’re forwarding to is already configured with the following:
Temporary voicemail greeting for Christmas.
Closed Hours or Holiday Schedule (optional) to match Christmas break dates.
Forward calls to voicemail after the greeting.
===========================================
Post-Holiday Cleanup
After the Christmas break, use the same PowerShell script to remove call forwarding:
foreach ($user in $TeamsUsers) {
Set-CsUserCallingSettings -Identity $user.UserPrincipalName -ForwardingType NoForwarding
}
Write-Host "Call forwarding removed for all Teams Voice users."