Preparing for Teams: Export all your Exchange UM Prompts quickly!

A nice quick post today.

Let’s say you’re in the middle of migrating your aging Lync or Skype for Business deployment over to a new platform.

Well with Office365 no longer supporting Exchange UM, there is a need to export your existing UM prompts so you can import them into Teams Auto Attendants. (or your third party Auto Attendant solution.)

Thanks to a quick pointer from Brandon Stuart at PEI, I managed to spin up this quick script that will export all your existing prompts and place them in nice neat folders for you.

Simply place it in a folder and run from Exchange PowerShell.

It will create a folder for each Auto Attendant and export any uploaded sounds as MP3’s

Voila: There’s your prompts in all their poorly recorded glory!

I’ll probably get around to packaging and signing the script in the future. But I figure I’d rather put this out now rather than sitting on my “Todo” pile forever.

$AutoAttendants = (get-UmAutoAttendant)
Foreach ($Attendant in $AutoAttendants)
{
Write-host "Processing $($attendant.name)" colour green
New-Item Path . Name $attendant.name ItemType "directory"
Set-Location Path .\$($Attendant.name)
#Info
If ($attendant.InfoAnnouncementFilename -eq "")
{
Write-host "No Info Announcement, Skipping"
}
Else
{
Write-host "Exporting Info Announcement"
$prompt = Export-UMPrompt UMAutoAttendant $attendant.name PromptFileName $attendant.InfoAnnouncementFilename
Set-Content Path ".\InfoAnnouncement.mp3" Value $prompt.AudioData Encoding Byte
}
#Bh Welcome
If ($attendant.BusinessHoursWelcomeGreetingFilename -eq "")
{
Write-host "No BH Welcome Announcement, Skipping"
}
Else
{
Write-host "Exporting BH Welcome Announcement"
$prompt = Export-UMPrompt UMAutoAttendant $attendant.name PromptFileName $attendant.BusinessHoursWelcomeGreetingFilename
Set-Content Path ".\BusinessHoursWelcomeGreeting.mp3" Value $prompt.AudioData Encoding Byte
}
#BH Menu
If ($attendant.BusinessHoursMainMenuCustomPromptFilename -eq "")
{
Write-host "No BH Main Menu Announcement, Skipping"
}
Else
{
Write-host "Exporting BH Main Menu Announcement"
$prompt = Export-UMPrompt UMAutoAttendant $attendant.name PromptFileName $attendant.BusinessHoursMainMenuCustomPromptFilename
Set-Content Path ".\BusinessHoursMainMenuCustomPrompt.mp3" Value $prompt.AudioData Encoding Byte
}
#AH Welcome
If ($attendant.AfterHoursWelcomeGreetingFilename -eq "")
{
Write-host "No AH Welcome Announcement, Skipping"
}
Else
{
Write-host "Exporting AH Welcome Announcement"
$prompt = Export-UMPrompt UMAutoAttendant $attendant.name PromptFileName $attendant.AfterHoursWelcomeGreetingFilename
Set-Content Path ".\AfterHoursWelcomeGreeting.mp3" Value $prompt.AudioData Encoding Byte
}
#AH Main Menu
If ($attendant.AfterHoursMainMenuCustomPromptFilename -eq "")
{
Write-host "No AH Main Menu Announcement, Skipping"
}
Else
{
Write-host "Exporting AH Main Menu Announcement"
$prompt = Export-UMPrompt UMAutoAttendant $attendant.name PromptFileName $attendant.AfterHoursMainMenuCustomPromptFilename
Set-Content Path ".\AfterHoursMainMenuCustomPrompt.mp3" Value $prompt.AudioData Encoding Byte
}
Set-Location Path ..
}

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.