I am working on a PowerShell runbook to look at all vms in the azure subscription, find out if guest level monitoring is not enabled and enable it
Following is the command I am using to enable the diags.
Set-AzureRmVMDiagnosticsExtension -ResourceGroupName xxxxxx -VMName xxxxxx -DiagnosticsConfigurationPath $diagnosticsconfig_path -StorageAccountName xxxxxx
I am thinking of storing the diag xml file in a storage blog, how do I point to it with $diagnosticsconfig_path ?
If I use
Get-AzureStorageBlobContent -blob "xxx.json" -Container xxx -Context $storageAccount.Context
or
Get-AzureStorageFileContent -ShareName 'xxx' -Context $storageAccount.Context -path xxx.json
The runbook can download the file but how do I refer to this file as the diagpath in Set-AzureRmVMDiagnosticsExtension