How can one create a Virtual Machine in Powershell?
VM creation using Powershell:
1) create resource:
New-AzResourceGroup -Name myResourceGroup -Location EastUS
2) create to VM:
New-AzVm `
-ResourceGroupName "myResourceGroup" `
-Name "myVM" `
-Location "East US" `
-VirtualNetworkName "myVnet" `
-SubnetName "mySubnet" `
-SecurityGroupName "myNetworkSecurityGroup" `
-PublicIpAddressName "myPublicIpAddress" `
-OpenPorts 80,3389
3) connect to VM:
Get-AzPublicIpAddress -ResourceGroupName "myResourceGroup" | Select "IpAddress"
4)find out the Public IP:
mstsc /v:publicIpAddress
5) Install IIS:
Install-WindowsFeature -name Web-Server -IncludeManagementTools
| Is This Answer Correct ? | 0 Yes | 0 No |
How to design applications to handle connection failure in windows azure?
when will you find the list of built-in app with add?
What is an Availability Set?
What is Redis cache in Azure?
What is Federation in SQL Azure?
What is an Azure Subscription?
What are stateful and stateless microservices for Service Fabric?
What do you mean by a domain?
How many databases can we create on a single server?
Difference between asr and arm?
What is meant by the unconnected lookups?
What are the three types of roles in the compute component in windows azure?