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

Ramdas 21 Reputation points
2020-02-06T07:25:20.327+00:00

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 Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
8,033 questions
0 comments No comments
{count} votes

Accepted answer
  1. jakaruna-MSFT 601 Reputation points Microsoft Employee
    2020-02-06T14:00:15.157+00:00

    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://learn.microsoft.com/en-us/powershell/azure/new-azureps-module-az?view=azps-3.4.0
    https://learn.microsoft.com/en-us/powershell/azure/install-az-ps?view=azps-3.4.0


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.