|
83 | 83 | <DefaultValue />
|
84 | 84 | </ParameterDescription>
|
85 | 85 | </Parameters>
|
86 |
| - <Examples /> |
| 86 | + <Examples> |
| 87 | + <Example> |
| 88 | + <Name>Example 1: Get all media services in a resource group</Name> |
| 89 | + <Cmd>PS C:\>Get-AzureRmMediaService -ResourceGroupName "resourcegroup1"</Cmd> |
| 90 | + <Description>This command gets properties for all media services in the resource group named resourcegroup1.</Description> |
| 91 | + <Output /> |
| 92 | + </Example> |
| 93 | + <Example> |
| 94 | + <Name>Example 2: Get media service properties</Name> |
| 95 | + <Cmd>PS C:\>Get-AzureRmMediaService -ResourceGroupName "resourcegroup1" -AccountName "mediaservice1"</Cmd> |
| 96 | + <Description>This command gets the properties of the media service named mediaservice1 in the resource group named resourcegroup1.</Description> |
| 97 | + <Output /> |
| 98 | + </Example> |
| 99 | + </Examples> |
87 | 100 | <RelatedLinks />
|
88 | 101 | <SupportInformation ad="false" rsat="false" ps2="false" ps3="false" ps4="false" ps5="false" wxp="false" wv="false" w7="false" w8="false" w81="false" w2k3s="false" w2k3e="false" w2k3d="false" w2k8s="false" w2k8e="false" w2k8d="false" w2k8r2s="false" w2k8r2e="false" w2k8r2d="false" w2k12s="false" w2k12d="false" w2k12r2s="false" w2k12r2d="false" />
|
89 | 102 | <Publish>false</Publish>
|
|
160 | 173 | <DefaultValue />
|
161 | 174 | </ParameterDescription>
|
162 | 175 | </Parameters>
|
163 |
| - <Examples /> |
| 176 | + <Examples> |
| 177 | + <Example> |
| 178 | + <Name>Example 1: Get the key information for accessing the media service.</Name> |
| 179 | + <Cmd>PS C:\>Get-AzureRmMediaServiceKeys -ResourceGroupName "resourcegroup1" -AccountName "mediaservice1"</Cmd> |
| 180 | + <Description>This command get the key information for accessing the media service named mediaservice1 in the resource group named resourcegroup1.</Description> |
| 181 | + <Output /> |
| 182 | + </Example> |
| 183 | + </Examples> |
164 | 184 | <RelatedLinks />
|
165 | 185 | <SupportInformation ad="false" rsat="false" ps2="false" ps3="false" ps4="false" ps5="false" wxp="false" wv="false" w7="false" w8="false" w81="false" w2k3s="false" w2k3e="false" w2k3d="false" w2k8s="false" w2k8e="false" w2k8d="false" w2k8r2s="false" w2k8r2e="false" w2k8r2d="false" w2k12s="false" w2k12d="false" w2k12r2s="false" w2k12r2d="false" />
|
166 | 186 | <Publish>false</Publish>
|
|
225 | 245 | <DefaultValue />
|
226 | 246 | </ParameterDescription>
|
227 | 247 | </Parameters>
|
228 |
| - <Examples /> |
| 248 | + <Examples> |
| 249 | + <Example> |
| 250 | + <Name>Example 1: Checks whether a Media Service name is available.</Name> |
| 251 | + <Cmd>PS C:\>Get-AzureRmMediaServiceNameAvailability -AccountName "mediaservice1"</Cmd> |
| 252 | + <Description>This command checks if the name mediaservice1 is available.</Description> |
| 253 | + <Output /> |
| 254 | + </Example> |
| 255 | + </Examples> |
229 | 256 | <RelatedLinks />
|
230 | 257 | <SupportInformation ad="false" rsat="false" ps2="false" ps3="false" ps4="false" ps5="false" wxp="false" wv="false" w7="false" w8="false" w81="false" w2k3s="false" w2k3e="false" w2k3d="false" w2k8s="false" w2k8e="false" w2k8d="false" w2k8r2s="false" w2k8r2e="false" w2k8r2d="false" w2k12s="false" w2k12d="false" w2k12r2s="false" w2k12r2d="false" />
|
231 | 258 | <Publish>false</Publish>
|
|
374 | 401 | <DefaultValue />
|
375 | 402 | </ParameterDescription>
|
376 | 403 | </Parameters>
|
377 |
| - <Examples /> |
| 404 | + <Examples> |
| 405 | + <Example> |
| 406 | + <Name>Example1: Create a media service with the primary storage account only</Name> |
| 407 | + <Cmd>PS C:\># Variables |
| 408 | +## Global |
| 409 | +$ResourceGroupName = "resourcegroup1" |
| 410 | +$Location = "East US" |
| 411 | + |
| 412 | +## Storage |
| 413 | +$StorageName = "storage1" |
| 414 | +$StorageType = "Standard_GRS" |
| 415 | + |
| 416 | +## Media Service |
| 417 | +$Tags = @{"tag1" = "value1"; "tag2" = "value2"} |
| 418 | +$MediaServiceName = "mediaservice1" |
| 419 | + |
| 420 | +# Resource Group |
| 421 | +New-AzureRmResourceGroup -Name $ResourceGroupName -Location $Location |
| 422 | + |
| 423 | +# Storage |
| 424 | +$StorageAccount = New-AzureRmStorageAccount -ResourceGroupName $ResourceGroupName -Name $StorageName -Location $Location -Type $StorageType |
| 425 | + |
| 426 | +# Media Service |
| 427 | +New-AzureRmMediaService -ResourceGroupName $ResourceGroupName -AccountName $MediaServiceName -Location $Location -StorageAccountId $StorageAccount.Id -Tags $Tags |
| 428 | +</Cmd> |
| 429 | + <Description>This example shows how to create a media service with specifying primary storage account only. This script uses several other cmdlets.</Description> |
| 430 | + <Output /> |
| 431 | + </Example> |
| 432 | + <Example> |
| 433 | + <Name>Example 2: Create a media service with multiple storage accounts</Name> |
| 434 | + <Cmd>PS C:\># Variables |
| 435 | + |
| 436 | +## Global |
| 437 | +$ResourceGroupName = "resourcegroup1" |
| 438 | +$Location = "East US" |
| 439 | + |
| 440 | +## Storage |
| 441 | +$StorageName1 = "storage1" |
| 442 | +$StorageName2 = "storage2" |
| 443 | +$StorageType = "Standard_GRS" |
| 444 | + |
| 445 | +## Media Service |
| 446 | +$Tags = @{"tag1" = "value1"; "tag2" = "value2"} |
| 447 | +$MediaServiceName = "mediaservice1" |
| 448 | + |
| 449 | +# Resource Group |
| 450 | +New-AzureRmResourceGroup -Name $ResourceGroupName -Location $Location |
| 451 | + |
| 452 | +# Storage |
| 453 | +$StorageAccount1 = New-AzureRmStorageAccount -ResourceGroupName $ResourceGroupName -Name $StorageName1 -Location $Location -Type $StorageType |
| 454 | +$StorageAccount2 = New-AzureRmStorageAccount -ResourceGroupName $ResourceGroupName -Name $StorageName2 -Location $Location -Type $StorageType |
| 455 | + |
| 456 | +# Media Service |
| 457 | + |
| 458 | +## Setup the storage configuration object. |
| 459 | +$PrimaryStorageAccount = New-AzureRmMediaServiceStorageConfig -StorageAccountId $StorageAccount1.Id -IsPrimary |
| 460 | +$SecondaryStorageAccount = New-AzureRmMediaServiceStorageConfig -StorageAccountId $StorageAccount2.Id |
| 461 | +$StorageAccounts = @($PrimaryStorageAccount, $SecondaryStorageAccount) |
| 462 | + |
| 463 | +## Create a media service. |
| 464 | +New-AzureRmMediaService -ResourceGroupName $ResourceGroupName -AccountName $MediaServiceName -Location $Location -StorageAccounts $StorageAccounts -Tags $Tags |
| 465 | +</Cmd> |
| 466 | + <Description>This command shows how to create a media service with multiple storage accounts. This script uses several other cmdlets.</Description> |
| 467 | + <Output /> |
| 468 | + </Example> |
| 469 | + </Examples> |
378 | 470 | <RelatedLinks />
|
379 | 471 | <SupportInformation ad="false" rsat="false" ps2="false" ps3="false" ps4="false" ps5="false" wxp="false" wv="false" w7="false" w8="false" w81="false" w2k3s="false" w2k3e="false" w2k3d="false" w2k8s="false" w2k8e="false" w2k8d="false" w2k8r2s="false" w2k8r2e="false" w2k8r2d="false" w2k12s="false" w2k12d="false" w2k12r2s="false" w2k12r2d="false" />
|
380 | 472 | <Publish>false</Publish>
|
|
484 | 576 | <DefaultValue />
|
485 | 577 | </ParameterDescription>
|
486 | 578 | </Parameters>
|
487 |
| - <Examples /> |
| 579 | + <Examples> |
| 580 | + <Example> |
| 581 | + <Name>Example 1: Remove a media service</Name> |
| 582 | + <Cmd>PS C:\>Remove-AzureRmMediaService -ResourceGroupName "resourcegroup1" -AccountName "mediaservice1"</Cmd> |
| 583 | + <Description>This command removes the media service named mediaservice1 in the resource group resourcegroup1.</Description> |
| 584 | + <Output /> |
| 585 | + </Example> |
| 586 | + </Examples> |
488 | 587 | <RelatedLinks />
|
489 | 588 | <SupportInformation ad="false" rsat="false" ps2="false" ps3="false" ps4="false" ps5="false" wxp="false" wv="false" w7="false" w8="false" w81="false" w2k3s="false" w2k3e="false" w2k3d="false" w2k8s="false" w2k8e="false" w2k8d="false" w2k8r2s="false" w2k8r2e="false" w2k8r2d="false" w2k12s="false" w2k12d="false" w2k12r2s="false" w2k12r2d="false" />
|
490 | 589 | <Publish>false</Publish>
|
|
605 | 704 | <DefaultValue />
|
606 | 705 | </ParameterDescription>
|
607 | 706 | </Parameters>
|
608 |
| - <Examples /> |
| 707 | + <Examples> |
| 708 | + <Example> |
| 709 | + <Name>Example 1: Set a media service.</Name> |
| 710 | + <Cmd>PS C:\>$Tags = @{"tag1" = "value1"; "tag2" = "value2"} |
| 711 | +Set-AzureRmMediaService -ResourceGroupName "resourcegroup1" -AccountName "mediaservice1" -Tags $Tags -StorageAccounts $StorageAccounts</Cmd> |
| 712 | + <Description>This command updates the media service named mediaservice1 in the resource group named resourcegroup1 with tags object stored in $Tags variable and an array of storage configuration objects stored in $StorageAccounts variable. For how to build an array of storage configuration objects, please see the Example 2 of New-AzureRmMediaService cmdlet.</Description> |
| 713 | + <Output /> |
| 714 | + </Example> |
| 715 | + </Examples> |
609 | 716 | <RelatedLinks />
|
610 | 717 | <SupportInformation ad="false" rsat="false" ps2="false" ps3="false" ps4="false" ps5="false" wxp="false" wv="false" w7="false" w8="false" w81="false" w2k3s="false" w2k3e="false" w2k3d="false" w2k8s="false" w2k8e="false" w2k8d="false" w2k8r2s="false" w2k8r2e="false" w2k8r2d="false" w2k12s="false" w2k12d="false" w2k12r2s="false" w2k12r2d="false" />
|
611 | 718 | <Publish>false</Publish>
|
|
715 | 822 | <DefaultValue />
|
716 | 823 | </ParameterDescription>
|
717 | 824 | </Parameters>
|
718 |
| - <Examples /> |
| 825 | + <Examples> |
| 826 | + <Example> |
| 827 | + <Name>Example 1: Regenerates the primary key used for accessing the Media Service.</Name> |
| 828 | + <Cmd>PS C:\>Set-AzureRmMediaServiceKey -ResourceGroupName "resourcegroup1" -AccountName "mediaservice1" -KeyType Primary</Cmd> |
| 829 | + <Description>This command regenerates the primary key for the media service named mediaservice1 in the resource group named resourcegroup1.</Description> |
| 830 | + <Output /> |
| 831 | + </Example> |
| 832 | + <Example> |
| 833 | + <Name>Exmaple 2: Regenerates the secondary key used for accessing the Media Service.</Name> |
| 834 | + <Cmd>PS C:\>Set-AzureRmMediaServiceKey -ResourceGroupName "resourcegroup1" -AccountName "mediaservice1" -KeyType Secondary</Cmd> |
| 835 | + <Description>This command regenerates the secondary key for the media service named mediaservice1 in the resource group named resourcegroup1.</Description> |
| 836 | + <Output /> |
| 837 | + </Example> |
| 838 | + </Examples> |
719 | 839 | <RelatedLinks />
|
720 | 840 | <SupportInformation ad="false" rsat="false" ps2="false" ps3="false" ps4="false" ps5="false" wxp="false" wv="false" w7="false" w8="false" w81="false" w2k3s="false" w2k3e="false" w2k3d="false" w2k8s="false" w2k8e="false" w2k8d="false" w2k8r2s="false" w2k8r2e="false" w2k8r2d="false" w2k12s="false" w2k12d="false" w2k12r2s="false" w2k12r2d="false" />
|
721 | 841 | <Publish>false</Publish>
|
|
829 | 949 | <DefaultValue />
|
830 | 950 | </ParameterDescription>
|
831 | 951 | </Parameters>
|
832 |
| - <Examples /> |
| 952 | + <Examples> |
| 953 | + <Example> |
| 954 | + <Name>Example 1: Synchronizes storage account keys for a storage account associated with the Media Service.</Name> |
| 955 | + <Cmd>PS C:\># Variables |
| 956 | +$ResoureceGroupName = "resourcegroup1" |
| 957 | + |
| 958 | +# Gets a storage account associated with the media service. |
| 959 | +$StorageAccount = Get-AzureRmStorageAccount -ResourceGroupName $ResourceGroupName -Name "storage1" |
| 960 | + |
| 961 | +# Synchronizes the storage account keys. |
| 962 | +Sync-AzureRmMediaServiceStorageKeys -ResourceGroupName $ResourceGroupName -AccoutName "mediaservice1" -StorageAccoutId $StorageAccount.Id</Cmd> |
| 963 | + <Description>This command synchronizes the keys of storage account named storage1 associated with the media service named mediaservice1 in the resource group resourcegroup1.</Description> |
| 964 | + <Output /> |
| 965 | + </Example> |
| 966 | + </Examples> |
833 | 967 | <RelatedLinks />
|
834 | 968 | <SupportInformation ad="false" rsat="false" ps2="false" ps3="false" ps4="false" ps5="false" wxp="false" wv="false" w7="false" w8="false" w81="false" w2k3s="false" w2k3e="false" w2k3d="false" w2k8s="false" w2k8e="false" w2k8d="false" w2k8r2s="false" w2k8r2e="false" w2k8r2d="false" w2k12s="false" w2k12d="false" w2k12r2s="false" w2k12r2d="false" />
|
835 | 969 | <Publish>false</Publish>
|
|
924 | 1058 | <DefaultValue />
|
925 | 1059 | </ParameterDescription>
|
926 | 1060 | </Parameters>
|
927 |
| - <Examples /> |
| 1061 | + <Examples> |
| 1062 | + <Example> |
| 1063 | + <Name>Example 1: Create a storage account configuration for the media service Cmdlets.</Name> |
| 1064 | + <Cmd>PS C:\># Create a storage account. |
| 1065 | +$StorageAccount = New-AzureRmStorageAccount -ResourceGroupName $ResourceGroupName -Name "storage1" -Location "East US" -Type "Standard_GRS" |
| 1066 | + |
| 1067 | +# Create a storage configuration object as the primary storage account associated with the media service. |
| 1068 | +New-AzureRmMediaServiceStorageConfig -StorageAccountId $StorageAccount.Id -IsPrimary |
| 1069 | + |
| 1070 | +</Cmd> |
| 1071 | + <Description>This command creates a storage configuration object by using storage account named storage1 and specifying it as the primary.</Description> |
| 1072 | + <Output /> |
| 1073 | + </Example> |
| 1074 | + </Examples> |
928 | 1075 | <RelatedLinks />
|
929 | 1076 | <SupportInformation ad="false" rsat="false" ps2="false" ps3="false" ps4="false" ps5="false" wxp="false" wv="false" w7="false" w8="false" w81="false" w2k3s="false" w2k3e="false" w2k3d="false" w2k8s="false" w2k8e="false" w2k8d="false" w2k8r2s="false" w2k8r2e="false" w2k8r2d="false" w2k12s="false" w2k12d="false" w2k12r2s="false" w2k12r2d="false" />
|
930 | 1077 | <Publish>false</Publish>
|
|
0 commit comments