Skip to content

Commit 9b5e510

Browse files
committed
Updated syntax per SME commens for AzureRM in Upload a VHD section
1 parent 1cb6ced commit 9b5e510

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

articles/databox-online/azure-stack-edge-gpu-deploy-virtual-machine-powershell.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ author: alkohli
77
ms.service: databox
88
ms.subservice: edge
99
ms.topic: how-to
10-
ms.date: 07/19/2023
10+
ms.date: 07/20/2023
1111
ms.author: alkohli
1212
ms.custom: devx-track-azurepowershell
1313
#Customer intent: As an IT admin, I need to understand how to create and manage virtual machines (VMs) on my Azure Stack Edge Pro device. I want to use APIs so that I can efficiently manage my VMs.
@@ -300,14 +300,15 @@ Use the following commands with AzCopy 10:
300300
Use the following commands with AzCopy 10:
301301
302302
```powershell
303+
$StorageAccountKey = (Get-AzureRmStorageAccountKey -ResourceGroupName $ResourceGroupName -Name $StorageAccountName)[0].Value
303304
$blobendpoint = (Get-AzureRmEnvironment -Name <environment name>).StorageEndpointSuffix
304-
305305
$StorageAccountContext = New-AzureStorageContext -StorageAccountName $StorageAccountName -StorageAccountKey $StorageAccountKey -Endpoint $blobendpoint
306-
307306
<Create the container if it does not exist>
308-
309307
$containerName = "con1"
310308
$container = New-AzureStorageContainer -Name $containerName -Context $StorageAccountContext -Permission Container
309+
$StorageAccountSAS = New-AzureStorageAccountSASToken -Service Blob -ResourceType Container,Service,Object -Permission "acdlrw" -Context $StorageAccountContext -Protocol HttpsOnly
310+
$endPoint = (Get-AzureRmStorageAccount -name $StorageAccountName -ResourceGroupName $ResourceGroupName).PrimaryEndpoints.Blob
311+
<Path to azcopy.exe> cp "$VHDPath\$VHDFile" "$endPoint$ContainerName$StorageAccountSAS"
311312
```
312313

313314
Here's some example output:

0 commit comments

Comments
 (0)