Create a VM using PowerShell

HomeOther ContentCreate a VM using PowerShell
Create a VM using PowerShell
Create a VM using PowerShell
We will follow the steps in this Microsoft document to create a Windows virtual machine using PowerShell.

https://docs.microsoft.com/en-us/azure/virtual-machines/windows/quick-create-powershell

New-AzResourceGroup -Name myResourceGroup -Location 'EastUS'

New-AzVm
-ResourceGroupName 'myResourceGroup'
-Name 'myVM'
-Location “Eastern United States”
-VirtualNetworkName 'myVnet'
-Subnet name 'mySubnet'
-SecurityGroupName 'myNetworkSecurityGroup'
-PublicIpAddressName 'myPublicIpAddress'
-OpenPorts 80.3389

Get-AzPublicIpAddress -ResourceGroupName 'myResourceGroup' Select-Object -Property 'IpAddress'

mstsc /v:publicIpaddress

Install-WindowsFeature -Web Server Name -IncludeManagementTools

Remove-AzResourceGroup -Name myResourceGroup

Please take the opportunity to connect and share this video with your friends and family if you find it useful.

No Comments

Leave a Reply

Your email address will not be published. Required fields are marked *