-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDownload-CQAudioFiles.ps1
More file actions
31 lines (31 loc) · 1.32 KB
/
Download-CQAudioFiles.ps1
File metadata and controls
31 lines (31 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Function Download-CQAudioFiles {
<#
Description:
This function will download previously uploaded audio files from the specified Microsoft Teams call queue to the specified folder on the local machine.
Parameters:
-Identitiy
-OutputFolder
Example:
Download-CQAudioFiles -Identitiy "6f45e634-0e8d-4f00-8f32-d8d4ca18dcfa" -OutputFolder "C:\Users\adm\Downloads\queue1"
Author:
Clayton Martin
Source:
https://github.com/Claytonjmartin/Download-CQAudioFiles
Disclaimer:
This script is provided "As Is" without any warranty of any kind. In no event shall the author be liable for any damages arising from the use of this script.
#>
param(
[Parameter(Mandatory = $true)]$Identity,
[Parameter(Mandatory = $true)]$OutputFolder
)
if(($OutputFolder[($OutputFolder.Length -1)]) -like "\"){
$OutputFolder = $OutputFolder -replace ".$"
}
$CQ = Get-CsCallQueue -Identity $Identity
if ($CQ.WelcomeMusicFileDownloadUri) {
Invoke-WebRequest -Uri $CQ.WelcomeMusicFileDownloadUri -OutFile ($OutputFolder + "\" + $CQ.Name + " WelcomeMusic.wav")
}
if ($CQ.MusicOnHoldFileDownloadUri) {
Invoke-WebRequest -Uri $CQ.MusicOnHoldFileDownloadUri -OutFile ($OutputFolder + "\" + $CQ.Name + " MusicOnHold.wav")
}
}