Skip to content

Commit 174ca18

Browse files
authored
Merge pull request MicrosoftDocs#67260 from sptramer/az-migrate-media
Az migrate media
2 parents 592c82f + b201f37 commit 174ca18

4 files changed

+26
-20
lines changed

articles/media-services/previous/TOC.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@
230230

231231
# Reference
232232
## [Code samples](https://azure.microsoft.com/resources/samples/?service=media-services)
233-
## [Azure PowerShell (Resource Manager)](/powershell/module/azurerm.media)
233+
## [Azure PowerShell (Resource Manager)](/powershell/module/az.media)
234234
## [Azure PowerShell (Service Management)](/powershell/module/servicemanagement/azure/?view=azuresmps-3.7.0)
235235
## [.NET](/dotnet/api/microsoft.windowsazure.mediaservices.client)
236236
## [REST](https://docs.microsoft.com/rest/api/media/operations/azure-media-services-rest-api-reference)

articles/media-services/previous/meda-services-managing-multiple-storage-accounts.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ You can attach multiple storage accounts to a single Media Services account. Abi
2323
* Load balancing your assets across multiple storage accounts.
2424
* Scaling Media Services for large amounts of content processing (as currently a single storage account has a max limit of 500 TB).
2525

26-
This article demonstrates how to attach multiple storage accounts to a Media Services account using [Azure Resource Manager APIs](/rest/api/media/operations/azure-media-services-rest-api-reference) and [Powershell](/powershell/module/azurerm.media). It also shows how to specify different storage accounts when creating assets using the Media Services SDK.
26+
This article demonstrates how to attach multiple storage accounts to a Media Services account using [Azure Resource Manager APIs](/rest/api/media/operations/azure-media-services-rest-api-reference) and [Powershell](/powershell/module/az.media). It also shows how to specify different storage accounts when creating assets using the Media Services SDK.
27+
28+
[!INCLUDE [updated-for-az](../../../includes/updated-for-az.md)]
2729

2830
## Considerations
2931

@@ -40,7 +42,7 @@ Media Services uses the value of the **IAssetFile.Name** property when building
4042

4143
## To attach storage accounts
4244

43-
To attach storage accounts to your AMS account, use [Azure Resource Manager APIs](/rest/api/media/operations/azure-media-services-rest-api-reference) and [Powershell](/powershell/module/azurerm.media), as shown in the following example:
45+
To attach storage accounts to your AMS account, use [Azure Resource Manager APIs](/rest/api/media/operations/azure-media-services-rest-api-reference) and [Powershell](/powershell/module/az.media), as shown in the following example:
4446

4547
$regionName = "West US"
4648
$subscriptionId = " xxxxxxxx-xxxx-xxxx-xxxx- xxxxxxxxxxxx "
@@ -50,11 +52,11 @@ To attach storage accounts to your AMS account, use [Azure Resource Manager APIs
5052
$storageAccount2Name = "skystorage2"
5153
$storageAccount1Id = "/subscriptions/$subscriptionId/resourceGroups/$resourceGroupName/providers/Microsoft.Storage/storageAccounts/$storageAccount1Name"
5254
$storageAccount2Id = "/subscriptions/$subscriptionId/resourceGroups/$resourceGroupName/providers/Microsoft.Storage/storageAccounts/$storageAccount2Name"
53-
$storageAccount1 = New-AzureRmMediaServiceStorageConfig -StorageAccountId $storageAccount1Id -IsPrimary
54-
$storageAccount2 = New-AzureRmMediaServiceStorageConfig -StorageAccountId $storageAccount2Id
55+
$storageAccount1 = New-AzMediaServiceStorageConfig -StorageAccountId $storageAccount1Id -IsPrimary
56+
$storageAccount2 = New-AzMediaServiceStorageConfig -StorageAccountId $storageAccount2Id
5557
$storageAccounts = @($storageAccount1, $storageAccount2)
5658

57-
Set-AzureRmMediaService -ResourceGroupName $resourceGroupName -AccountName $mediaAccountName -StorageAccounts $storageAccounts
59+
Set-AzMediaService -ResourceGroupName $resourceGroupName -AccountName $mediaAccountName -StorageAccounts $storageAccounts
5860

5961
### Support for Cool Storage
6062

articles/media-services/previous/media-services-powershell-create-and-configure-aad-app.md

+11-9
Original file line numberDiff line numberDiff line change
@@ -23,29 +23,31 @@ Learn how to use a PowerShell script to create an Azure Active Directory (Azure
2323

2424
## Prerequisites
2525

26+
[!INCLUDE [updated-for-az](../../../includes/updated-for-az.md)]
27+
2628
- An Azure account. If you don't have an account, start with an [Azure free trial](https://azure.microsoft.com/pricing/free-trial/).
2729
- A Media Services account. For more information, see [Create an Azure Media Services account in the Azure portal](media-services-portal-create-account.md).
28-
- Azure PowerShell version 0.8.8 or a later version. For more information, see [How to use Azure PowerShell](https://docs.microsoft.com/powershell/azure/overview).
29-
- Azure Resource Manager cmdlets.
30+
31+
- Azure PowerShell. For more information, see [How to use Azure PowerShell](https://docs.microsoft.com/powershell/azure/overview).
3032

3133
## Create an Azure AD app by using PowerShell
3234

3335
```powershell
34-
Connect-AzureRmAccount
35-
Import-Module AzureRM.Resources
36-
Set-AzureRmContext -SubscriptionId $SubscriptionId
37-
$ServicePrincipal = New-AzureRMADServicePrincipal -DisplayName $ApplicationDisplayName -Password $Password
36+
Connect-AzAccount
37+
Import-Module Az.Resources
38+
Set-AzContext -SubscriptionId $SubscriptionId
39+
$ServicePrincipal = New-AzADServicePrincipal -DisplayName $ApplicationDisplayName -Password $Password
3840
39-
Get-AzureRmADServicePrincipal -ObjectId $ServicePrincipal.Id
41+
Get-AzADServicePrincipal -ObjectId $ServicePrincipal.Id
4042
$NewRole = $null
4143
$Scope = "/subscriptions/your subscription id/resourceGroups/userresourcegroup/providers/microsoft.media/mediaservices/your media account"
4244
4345
$Retries = 0;While ($NewRole -eq $null -and $Retries -le 6)
4446
{
4547
# Sleep here for a few seconds to allow the service principal application to become active (usually, it will take only a couple of seconds)
4648
Sleep 15
47-
New-AzureRMRoleAssignment -RoleDefinitionName Contributor -ServicePrincipalName $ServicePrincipal.ApplicationId -Scope $Scope | Write-Verbose -ErrorAction SilentlyContinue
48-
$NewRole = Get-AzureRMRoleAssignment -ServicePrincipalName $ServicePrincipal.ApplicationId -ErrorAction SilentlyContinue
49+
New-AzRoleAssignment -RoleDefinitionName Contributor -ServicePrincipalName $ServicePrincipal.ApplicationId -Scope $Scope | Write-Verbose -ErrorAction SilentlyContinue
50+
$NewRole = Get-AzRoleAssignment -ServicePrincipalName $ServicePrincipal.ApplicationId -ErrorAction SilentlyContinue
4951
$Retries++;
5052
}
5153
```

articles/media-services/previous/media-services-roll-storage-access-keys.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ ms.author: milanga;cenkdin;juliako
2121

2222
When you create a new Azure Media Services (AMS) account, you are also asked to select an Azure Storage account that is used to store your media content. You can add more than one storage accounts to your Media Services account. This article shows how to rotate storage keys. It also shows how to add storage accounts to a media account.
2323

24-
To perform the actions described in this article, you should be using [Azure Resource Manager APIs](/rest/api/media/operations/azure-media-services-rest-api-reference) and [Powershell](https://docs.microsoft.com/powershell/module/azurerm.media). For more information, see [How to manage Azure resources with PowerShell and Resource Manager](../../azure-resource-manager/powershell-azure-resource-manager.md).
24+
To perform the actions described in this article, you should be using [Azure Resource Manager APIs](/rest/api/media/operations/azure-media-services-rest-api-reference) and [Powershell](https://docs.microsoft.com/powershell/module/az.media). For more information, see [How to manage Azure resources with PowerShell and Resource Manager](../../azure-resource-manager/powershell-azure-resource-manager.md).
25+
26+
[!INCLUDE [updated-for-az](../../../includes/updated-for-az.md)]
2527

2628
## Overview
2729

@@ -38,15 +40,15 @@ Media Services depends on a storage key provided to it. Specifically, the locato
3840
## Steps to rotate storage keys
3941

4042
1. Change the storage account Primary key through the powershell cmdlet or [Azure](https://portal.azure.com/) portal.
41-
2. Call Sync-AzureRmMediaServiceStorageKeys cmdlet with appropriate params to force media account to pick up storage account keys
43+
2. Call Sync-AzMediaServiceStorageKeys cmdlet with appropriate params to force media account to pick up storage account keys
4244

4345
The following example shows how to sync keys to storage accounts.
4446

45-
Sync-AzureRmMediaServiceStorageKeys -ResourceGroupName $resourceGroupName -AccountName $mediaAccountName -StorageAccountId $storageAccountId
47+
Sync-AzMediaServiceStorageKeys -ResourceGroupName $resourceGroupName -AccountName $mediaAccountName -StorageAccountId $storageAccountId
4648

4749
3. Wait an hour or so. Verify the streaming scenarios are working.
4850
4. Change storage account secondary key through the powershell cmdlet or Azure portal.
49-
5. Call Sync-AzureRmMediaServiceStorageKeys powershell with appropriate params to force media account to pick up new storage account keys.
51+
5. Call Sync-AzMediaServiceStorageKeys powershell with appropriate params to force media account to pick up new storage account keys.
5052
6. Wait an hour or so. Verify the streaming scenarios are working.
5153

5254
### A powershell cmdlet example
@@ -59,7 +61,7 @@ The following example demonstrates how to get the storage account and sync it wi
5961
$storageAccountName = "skystorage"
6062
$storageAccountId = "/subscriptions/$subscriptionId/resourceGroups/$resourceGroupName/providers/Microsoft.Storage/storageAccounts/$storageAccountName"
6163

62-
Sync-AzureRmMediaServiceStorageKeys -ResourceGroupName $resourceGroupName -AccountName $mediaAccountName -StorageAccountId $storageAccountId
64+
Sync-AzMediaServiceStorageKeys -ResourceGroupName $resourceGroupName -AccountName $mediaAccountName -StorageAccountId $storageAccountId
6365

6466

6567
## Steps to add storage accounts to your AMS account

0 commit comments

Comments
 (0)