question

Ramdassp avatar image
0 Votes"
Ramdassp asked ·

Unable to set azure vm boot diagnostics using already existing storage accounts from different resource group using powershell

Hi,

I am trying to automate vm deployment using PowerShell with existing storage accounts designated only for boot diagnostics, and they obviously sit in different resource groups. but i am not able to do so because the powershell cmdlet Set-AzureRmVMBootDiagnostics does not have any parameter where we can pass storage account from different resource group. currently we can only pass parameter such as vm resource group and storage account from vm resource group.

any help is highly appreciated.

azure-virtual-machinesazure-virtual-machines-storage
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

jakaruna-MSFT avatar image
0 Votes"
jakaruna-MSFT answered ·

Set-AzureRmVMBootDiagnostics is deprecated.

Use Set-AzVMBootDiagnostic. You need to uninstall the old module and install the new Az powershell module.

In Set-AzVMBootDiagnostic, Resource group parameter takes storage accounts resource group. Reference is here

To upgrade or install the new powershell module, follow the doc urls mentioned below. https://docs.microsoft.com/en-us/powershell/azure/new-azureps-module-az?view=azps-3.4.0 https://docs.microsoft.com/en-us/powershell/azure/install-az-ps?view=azps-3.4.0

· 1 · Share
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you..I think i have to rewrite my scripts to use new az module.

0 Votes 0 · ·