How to initialize a disk after I append a data disk to azure windows VM using custom script extension powershell

Dnyaneshwar Surywanshi 156 Reputation points
2021-01-27T17:11:06.817+00:00

I am adding DataDisk to windows VM using ARM template now I want to initialize disk using custom script extension powershell.

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
9,053 questions
Windows for business | Windows Server | User experience | PowerShell
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Andreas Baumgarten 123.7K Reputation points MVP Volunteer Moderator
    2021-01-27T18:56:17.87+00:00

    Here is described how to add a custom script extension in an ARM template:

    https://learn.microsoft.com/en-us/azure/azure-arc/servers/manage-vm-extensions-template#deploy-the-custom-script-extension

    ----------

    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards
    Andreas Baumgarten

    2 people found this answer helpful.
    0 comments No comments

  2. Andreas Baumgarten 123.7K Reputation points MVP Volunteer Moderator
    2021-01-27T17:17:08.533+00:00

    Maybe this is helpful:

    https://learn.microsoft.com/en-us/azure/virtual-machines/windows/attach-disk-ps#initialize-the-disk

    ----------

    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards
    Andreas Baumgarten


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.