Articles → MICROSOFT AZURE → Custom script extension in Azure

Custom script extension in Azure






Purpose





Scenario





Custom PowerShell script




import-module servermanager
add-windowsfeature web-server -includeallsubfeature





Create a storage account






Picture showing a new storage account created

Click to Enlarge



Picture showing a new container inside the storage account

Click to Enlarge



Picture showing the powershell script uploaded inside the container

Click to Enlarge


Execute custom script in virtual machine








Picture showing the Extensions submenu inside the virtual machine

Click to Enlarge



Picture showing the screen for adding the extensions in the virtual machine

Click to Enlarge



Picture showing the custom script extension in the list of resources

Click to Enlarge



Picture showing the create button for creating the custom extensions

Click to Enlarge



Picture showing an option to select the file to be executed on the virtual machine

Click to Enlarge



Picture showing the accessing the powershell script from the container inside the storage account

Click to Enlarge



Picture showing the powershell script selected in the custom extension screen

Click to Enlarge





Picture showing the screen to confirm that deployment is completed

Click to Enlarge


Output




Picture showing the IIS home screen in the browser of the virtual machine

Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Tuesday, April 20, 2021

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250