question

DnyaneshwarSurywanshi-3200 avatar image
0 Votes"
DnyaneshwarSurywanshi-3200 asked AndreasBaumgarten answered

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

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

windows-server-powershellazure-virtual-machinesazure-virtual-machines-extension
5 |1600 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.

AndreasBaumgarten avatar image
0 Votes"
AndreasBaumgarten answered DnyaneshwarSurywanshi-3200 commented

Maybe this is helpful:

https://docs.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

· 1
5 |1600 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.

@AndreasBaumgarten Thank you for the reply I want want to initialize/format Azure Windows VM's Data Disks from ARM Template Deployment?

0 Votes 0 ·
AndreasBaumgarten avatar image
2 Votes"
AndreasBaumgarten answered

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

https://docs.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

5 |1600 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.