How can one create a Virtual Machine in Powershell?
Answer Posted / wipro123
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 |
Post New Answer View All Answers
Do scale sets work with Azure availability sets?
Define Network Security Groups?
How many customers subscriptions allowed in managed disks?
what is guest os?
How do I become azure certified?
what is web role in windows azure?
Which services are used to manage the resources in azure?
what is a role instance ?
what is csrun?
Define the DevOps Function in Azure Cloud Service?
What can I do on azure?
What is windows azure?
Mention in what ways cloud architecture provide automation and performance transparency? Elaborate.
State the difference pricing model of microsoft azure?
What are zones in azure?