About Me

My photo
HANUMANGARH, RAJASTHAN, India

Friday, 8 January 2021

Add Custom Script Extension on multiple Azure VMs

 

How it works?

First of all you must have a script which you want to run on all of yours Azure virtual machines. In my case it was script for FTP installation on IIS – but for you it can be for example on creation of local user of group on machine. Once you have a script you should copy it as a blob to storage account. Once it is done you should provide proper input parameters to script, limit the scope of virtual machines to which it should apply (line 12 of a script) and this is the way to add custom script extension to multiple machines on Azure.

Extract Disk Info from Remote host

 # Define the remote hostname or IP address $remoteHost = Get-Content "C:\temp\RemoteServer.txt" # Define the output CSV file path...