If it is advisable run PowerShell scripts for digital machines with out having to RDP right into a digital machine or when you don’t have entry to the digital machines on the OS stage, you are able to do so by means of the Azure portal’s Run Command beneath the VM airplane.
The run command makes use of the Digital Machine agent to run the script contained in the digital machine.
Presently, we’ve got a Digital Machine, and we’ve got enabled the HTTP and HTTPS within the Community Safety Group (NSG).
Once I copy and paste the Public IP for my VM, the web page shouldn’t be displayed as a result of we do not set up Web Info Companies (IIS) on the VM.
Choose the run command beneath the operations after which choose RunPowerShellScript.
Enter the under instructions and click on Run.
Set up-WindowsFeature -name Net-Server -IncludeManagementTools
The Web Info Service (IIS) set up has been efficiently accomplished.
After we refresh the browser the Web Info Service (IIS) will load. Now if we need to host our personal web site within the digital machine, login to the digital machine and add the web site recordsdata.