As an example you have got a home windows digital machine working and you could add an extension otherwise you need to obtain and execute scripts in your Home windows digital machine. There may be a simple means to do that in your digital machine. You need to use a customized script extension device to obtain and execute script extension on Azure. This can be utilized for deploying any customized configuration or any software program set up in your Home windows digital machine.
These customized scripts are a set of directions that will get executed and these information might be saved in an Azure storage account or you’ll be able to host these information on Github. Microsoft Azure executes these scripts for 90 minutes so we are able to say that the utmost time length given for the script is 90 minutes to execute. if the script does not end executions in 90 minutes then meaning a failed extension provision.
it is very important notice that these scripts should not have reboot instructions as a result of if the digital machine rebooted throughout executions of the script then it is going to be a failed execution. The extension is not going to proceed to run after the reboot takes place. So for those who suppose you have got this type of requirement then it’s not advisable to make use of customized script extension and use another instruments.
- No want for RDP or SSH to machine to put in the software program.
- No want for RDP or SSH to execute customized scripts on digital machines.
Learn how to use Customized Script Extension
Go to Azure Portal and go to the digital machine and choose your Home windows digital machine. if you do not have a digital machine then you’ll be able to create the digital machine. You possibly can be taught extra right here about methods to create a digital machine. I wish to recommend creating home windows digital machine to try it out.
So if I am going to the Azure digital machine and take the general public IP deal with of the digital machine and browse you will notice nothing as a result of IIS will not be working so what we gonna do is we’re going to set up IIS on this digital machine.
Now allow us to use customized script extensions to put in the IIS service on this digital machine. So we’re going to create a PowerShell script file and right here we’re importing the mannequin of server supervisor and including the home windows function of the webserver on this digital machine. It will permits us to put in IIS on this digital machine. Under are the instructions we’re going to use.
add-windowsfeature web-server -includeallsubfeature
As mentioned, we are able to use Github or Azure Storage for storing this file. So allow us to use a storage account for storing this file and executing the script. The digital machine will decide up the script file from the storage account and execute the script.
Now go to your digital machine and go to Extensions and click on on add an extension.
Now discover Customized Script Extension and click on on it.
Now click on on create and choose script file.
Now click on on browse and if in case you have an current storage account then you’ll be able to add your file. When you’ve got one then you’ll be able to browse right here in any other case, click on on add enter the small print.
Give it a while and you will notice your newly created storage account and click on on it.
Now you could create a container in your storage account. Click on on add container and enter the small print.
Now click on on the container and click on on add and add your .ps1 file. as soon as every little thing is full then give it a while to finish the deployment.
As soon as the provisioning is full then you’ll be able to see that one customized script within the record and the standing is Provisioning Succeeded.
As soon as the provisioning is full you’ll be able to go to the general public IP of the digital machine and you’ll see that IIS on this digital machine is working. So that is the one technique to execute the scripts in your digital machines.
You possibly can entry the script file right here, so on this article, we discovered about what’s customized script extension and methods to use it. Thanks for studying and keep secure.