Import-CsOnlineAudioFile

Use the Import-CsOnlineAudioFile cmdlet to upload a new audio file.

Syntax

Import-CsOnlineAudioFile
      -ApplicationId <OrgAutoAttendant | HuntGroup | TenantGlobal>
      -FileName <string>
      -Content <byte[]>

Description

The Import-CsOnlineAudioFile cmdlet uploads a new audio file for use with the Auto Attendant (AA), Call Queue (CQ) service or Music on Hold for Microsoft Teams.

Examples

-------------------------- Example 1 --------------------------

$content = Get-Content "C:\Media\Welcome.wav" -Encoding byte -ReadCount 0
$audioFile = Import-CsOnlineAudioFile -ApplicationId "OrgAutoAttendant" -FileName "Hello.wav" -Content $content

This example creates a new audio file using the WAV content that has a filename of Hello.wav to be used with organizational auto attendants. The stored variable, $audioFile, will be used when running other cmdlets to update the audio file for Auto Attendant, for example: [New-CsAutoAttendantPrompt] (https://docs.microsoft.com/powershell/module/skype/new-csautoattendantprompt)

-------------------------- Example 2 --------------------------

$content = Get-Content "C:\Media\MOH.wav" -Encoding byte -ReadCount 0
$audioFile = Import-CsOnlineAudioFile -ApplicationId "HuntGroup" -FileName "MOH.wav" -Content $content

This example creates a new audio file using the WAV content that has a filename of MOH.wav to be used as a Music On Hold file with a Call Queue. The stored variable, $audioFile, will be used with [Set-CsCallQueue] (https://docs.microsoft.com/powershell/module/skype/set-cscallqueue) to provide the audio file id.

-------------------------- Example 3 --------------------------

$content = Get-Content "C:\Media\MOH.wav" -Encoding byte -ReadCount 0
$audioFile = Import-CsOnlineAudioFile -ApplicationId TenantGlobal -FileName "MOH.wav" -Content $content

This example creates a new audio file using the WAV content that has a filename of MOH.wav to be used as Music On Hold for Microsoft Teams. The stored variable, $audioFile, will be used with [New-CsTeamsCallHoldPolicy] (https://docs.microsoft.com/powershell/module/skype/new-csteamscallholdpolicy) to provide the audio file id.

Parameters

-ApplicationId

The ApplicationId parameter is the identifier for the application which will use this audio file. For example, if the audio file will be used with an organizational auto attendant, then it needs to be set to "OrgAutoAttendant". If the audio file will be used with a hunt group (call queue), then it needs to be set to "HuntGroup". If the audio file will be used with Microsoft Teams, then it needs to be set to "TenantGlobal"

Supported values:

  • OrgAutoAttendant
  • HuntGroup
  • TenantGlobal
Type:System.string
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Microsoft Teams
-Content

The Content parameter represents the content of the audio file. Supported formats are WAV (uncompressed, linear PCM with 8/16/32-bit depth in mono or stereo), WMA (mono only), and MP3. The audio file content cannot be more 5MB.

Type:System.Byte[]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Microsoft Teams
-FileName

The FileName parameter is the name of the audio file. For example, the file name for the file C:\Media\Welcome.wav is Welcome.wav.

Type:System.string
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Microsoft Teams

Inputs

None

Outputs

Microsoft.Rtc.Management.Hosted.Online.Models.AudioFile

Notes

You are responsible for independently clearing and securing all necessary rights and permissions to use any music or audio file with your Microsoft Teams service, which may include intellectual property and other rights in any music, sound effects, audio, brands, names, and other content in the audio file from all relevant rights holders, which may include artists, actors, performers, musicians, songwriters, composers, record labels, music publishers, unions, guilds, rights societies, collective management organizations and any other parties who own, control or license the music copyrights, sound effects, audio and other intellectual property rights.