Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Why doesn’t azure redis cache has an msdn class library reference like some of the other azure services?

591


State the class that can be used to retrieve data?

628


Explain managing session state in windows azure?

573


What are azure cloud services?

584


How to migrate the on-prem servers to azure?

623


what is difference between windows azure platform and windows azure?

680


What do you comprehend about Hybrid Cloud?

559


How many customers subscriptions allowed in managed disks?

597


what is swap deployments?

646


What is the format of an Azure Resource template?

579


What is the method for creating a queue in storage account?

633


Explain azure mobile service. How can we create and integrate new mobile service in the new or existing application?

617


What is the difference between web role and worker role?

552


How would you categorize windows azure?

655


Recommend approaches for controlling access to the service by using the windows azure appfabric access control service?

906