編集

次の方法で共有


Import-CsOnlineAudioFile

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

Syntax

Import-CsOnlineAudioFile
      -ApplicationId <String>
      -FileName <string>
      -Content <Byte[]>
      [<CommonParameters>]

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 = [System.IO.File]::ReadAllBytes('C:\Media\Hello.wav')
$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.

Example 2

$content = [System.IO.File]::ReadAllBytes('C:\Media\MOH.wav')
$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 to provide the audio file id.

Example 3

$content = [System.IO.File]::ReadAllBytes('C:\Media\MOH.wav')
$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 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 Auto Attendant, then it needs to be set to "OrgAutoAttendant". If the audio file will be used with a 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:String
Position:Named
Default value:None
Required:True
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:Byte[]
Position:Named
Default value:None
Required:True
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:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False
Applies to:Microsoft Teams

Inputs

None

Outputs

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

Notes

When you import an audio file to be used for Auto Attendant or Call Queue, the audio file will automatically be marked for deletion (as seen by running Get-CsOnlineAudioFile) and it will be deleted after 48 to 72 hours from the time of import, unless the audio file is associated to an Auto Attendant and Call Queue before 48 hours after it was imported.

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.