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
What are the types of storage available in azure?
How do I connect to azure cloud service?
Explain the crucial benefits of traffic manager?
What the important requirements when creating a new virtual machine?
Which role is a virtual machine instance running Microsoft IIS Web server that can accept and respond to HTTP or HTTPS requests?
What do you mean by the stateful and stateless micro-services for service fabric?
Mention in what ways cloud architecture provide automation and performance transparency? Elaborate.
What is the distinction between Windows Azure Queues and Windows Azure Service Bus Queues?
What is the pack?
I have some private servers on my premises, also I have distributed some of my workload on the public cloud, what is this architecture called?
What is Windows Azure Scheduler?
Explain azure service level agreement (sla)?
How can you retrieve the state of a particular VM?
what is web role in windows azure?
Explain azure mobile service. How can we create and integrate new mobile service in the new or existing application?