
Deploy custom script through VM Extensions in Windows Azure VM
In this blog, we will show you the steps to deploy custom script through VM Extensions in Windows Azure VM through the portal.
REQUIREMENTS
- Microsoft Azure Subscription
- Azure VM
VM EXTENSION OVERVIEW
- VM Extension will help us to do the configuration management in the Azure cloud.
- Windows and Linux agents are automatically installed on any VMs deployed from the Azure gallery.
- This agent is very important to manage the life cycle of the VMs through azure Application Programming Interface (API).
- In order to add new extensions in the gallery, you have to be a Microsoft employee or whitelisted extension publisher.
- We can always install our own agents directly into the VM.
- The Linux agent and Microsoft Linux Extensions are available at Github.
DEPLOYING SCRIPT
- Log in to Microsoft Azure portal using your subscription.
- Click on the Virtual Machines link.
- Select the VM to deploy the VM extensions and click on it. In this demo, we are using the VM named az-vm-01.
- Click on the Extension link from the VM settings.
- Now, click on the Add button.
- You can see the various types of extensions that are available for windows azure VM.
- To deploy the custom script, Click on the Custom Script Extension option.
- To create a new extension, Click on Create button.
- We have already created a sample PowerShell script file to save the windows process into a text file under C:\ drive.
- Select the script by click on the browse button.
- Click OK to start the deployment.
- It will take several minutes to complete the deployment.
- You can see the script details and its status.
- Click on the extension name CustomScriptExtension.
- Click on View Detailed Status link.
- You can see the deployment status information.
VERIFICATION
- Log in to your Azure VM with login credentials using RDP.
- You can able to see the getprocess.txt file in C:\ drive.
VIDEO
Thanks for reading this blog. We hope it was useful for you to know about VM extensions on Microsoft Azure.

Loges