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
Why doesn’t azure redis cache has an msdn class library reference like some of the other azure services?
State the class that can be used to retrieve data?
Explain managing session state in windows azure?
What are azure cloud services?
How to migrate the on-prem servers to azure?
what is difference between windows azure platform and windows azure?
What do you comprehend about Hybrid Cloud?
How many customers subscriptions allowed in managed disks?
what is swap deployments?
What is the format of an Azure Resource template?
What is the method for creating a queue in storage account?
Explain azure mobile service. How can we create and integrate new mobile service in the new or existing application?
What is the difference between web role and worker role?
How would you categorize windows azure?
Recommend approaches for controlling access to the service by using the windows azure appfabric access control service?