New-AzureRmMediaServiceStorageConfig

Create a storage account configuration for the media service cmdlets.

Syntax

New-AzureRmMediaServiceStorageConfig
   [-DefaultProfile <IAzureContextContainer>]
   [-StorageAccountId] <String>
   [-IsPrimary]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The New-AzureRmMediaServiceStorageConfig cmdlet creates a storage account configuration for the media service cmdlets.

Examples

Example 1: Create a storage account configuration for the media service cmdlets

PS C:\>
$StorageAccount = New-AzureRmStorageAccount -ResourceGroupName $ResourceGroupName -Name "Storage1" -Location "East US" -Type "Standard_GRS"

PS C:\> New-AzureRmMediaServiceStorageConfig -StorageAccountId $StorageAccount.Id -IsPrimary

The first command creates a storage account object by using the New-AzureRmStorageAccount cmdlet. The command names this storage account Storage1 and the type is named Standard_GRS and stores the result in the variable named $StorageAccount.

The second command creates a storage configuration object as the primary storage account associated with the media service using the storage account ID information stored in the $StorageAccount variable.

Required Parameters

-StorageAccountId

Specifies the ID of the storage account.

Type:String
Position:0
Default value:None
Accept pipeline input:True (ByPropertyName)
Accept wildcard characters:False

Optional Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:System.Management.Automation.SwitchParameter
Aliases:cf
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False
-DefaultProfile

The credentials, account, tenant, and subscription used for communication with azure

Type:Microsoft.Azure.Commands.Common.Authentication.Abstractions.IAzureContextContainer
Aliases:AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-IsPrimary

Indicates that the cmdlet creates the storage account as the primary storage for the media service.

Type:System.Management.Automation.SwitchParameter
Position:1
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:System.Management.Automation.SwitchParameter
Aliases:wi
Position:Named
Default value:False
Accept pipeline input:False
Accept wildcard characters:False

Outputs

Microsoft.Azure.Commands.Media.Models.PSStorageAccount