Skip to content

Commit e9d243f

Browse files
authored
fix a few things in the ps script
1 parent c42180e commit e9d243f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

articles/virtual-machines/extensions/diagnostics-linux.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,13 @@ $publicSettings = $publicSettings.Replace('__VM_RESOURCE_ID__', $vm.Id)
105105
# If you have your own customized public settings, you can inline those rather than using the template above: $publicSettings = '{"ladCfg": { ... },}'
106106
107107
# Generate a SAS token for the agent to use to authenticate with the storage account
108-
$sasToken = New-AzureStorageAccountSASToken -Service Blob,Table -ResourceType Service,Container,Object -Permission "racwdlup" -Context (Get-AzureRmStorageAccount -ResourceGroupName $storageAccountResourceGroup -AccountName $storageAccountName).Context
108+
$sasToken = New-AzStorageAccountSASToken -Service Blob,Table -ResourceType Service,Container,Object -Permission "racwdlup" -Context (Get-AzStorageAccount -ResourceGroupName $storageAccountResourceGroup -AccountName $storageAccountName).Context
109109
110110
# Build the protected settings (storage account SAS token)
111111
$protectedSettings="{'storageAccountName': '$storageAccountName', 'storageAccountSasToken': '$sasToken'}"
112112
113113
# Finally install the extension with the settings built above
114-
Set-AzureRmVMExtension -ResourceGroupName $VMresourceGroup -VMName $vmName -Location $vm.Location -ExtensionType LinuxDiagnostic -Publisher Microsoft.Azure.Diagnostics -Name LinuxDiagnostic -SettingString $publicSettings -ProtectedSettingString $protectedSettings -TypeHandlerVersion 3.0
114+
Set-AzVMExtension -ResourceGroupName $VMresourceGroup -VMName $vmName -Location $vm.Location -ExtensionType LinuxDiagnostic -Publisher Microsoft.Azure.Diagnostics -Name LinuxDiagnostic -SettingString $publicSettings -ProtectedSettingString $protectedSettings -TypeHandlerVersion 3.0
115115
```
116116

117117
### Updating the extension settings

0 commit comments

Comments
 (0)