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
Mention the services that are provided by Window Azure Operating System?
What is windows azure storage emulator?
Discuss the different database types in SQL Azure?
Explain the service definition file?
What is meant by PaaS, SaaS, and IaaS?
What is Azure Cloud Service?
Explain the Queue storage with Azure?
How can you retrieve the state of a particular VM?
What is the azure app service? What are the advantages of app service over mobile service?
What are windows azure diagnostics?
How are Azure Marketplace subscriptions priced?
What is the azure redis cache? How is it different from other azure services?
What are the types of storage available in azure?
what is scale a cloud service ?
What is the dead letter queue?