Introduction
In this article we are going to deploy custom script extension for windows. The custom script extension tool can be used on our Azure virtual machines when we want deployment in Windows. These scripts can be located at our storage account.
Currently, we have an Azure Virtual Machine with the Windows Server 2016 operating system and the Public IP address in 13.82.7.75.
Step 1
Open the PowerShell ISE. We need to enter the Internet Information Service installation Script and then save the script file, in this demo our script file name is “iisscript.ps1”
Step 2
Now we are going to create a storage account, so we will choose the correct subscription and the correct resource group, we can provide a name for our storage account “lankascript”, for the location of the storage account it must be in the same location housing as our virtual machine, and then click “Review + Create”.
Step 3
After successfully creating the storage account, open the storage account “lankascript”, and then select “Containers”
Step 4
In the “lankascript” containers click “+ Container”, enter the name for the container and click create.
Step 5
Now we need to upload our Script “iisscript.ps1” file that we have already created in Step 1. Click the browse button, then select the script file and upload it.
Step 6
After successfully uploading the Script file, go to the Virtual Machine, select “Extension” and then click “+ Add”.
Step 7
Now Select the Custom Script Extension and click the Create button.
Step 8
Click the browse button and select the “Storage Account”.
Step 9
Select the storage account that we have uploaded the script file. In our demo, we have uploaded the script file into “lankastorage”, so click the correct storage account.
Step 10
Select the Script Container
Step 11
In the Script Container Select the “iisscript.ps1” file and then click “Select”.
Step 12
Now the file is initializing the deployment.
Step 13
Now we can verify that the Custom Script Extension status is “Provisioning Succeeded”.
Step 14
Copy the Public IP address from the “LankaVM”.
Step 15
Past the IP address and press enter, we can get the Internet Information Services Landing Page.
Summary
If you haven’t received the Internet Information Services Landing Page, check the Network Security Group, Port 80. In this article we have learned how to deploy custom script extension. If you have any questions feel free to comment under the comment box.