Skip to content

Instantly share code, notes, and snippets.

@atulkamble
Last active August 11, 2021 06:05
Show Gist options
  • Save atulkamble/856c0d68c1bda620ad0240984022584f to your computer and use it in GitHub Desktop.
Save atulkamble/856c0d68c1bda620ad0240984022584f to your computer and use it in GitHub Desktop.
use the New-AzVM cmdlet to create a new Azure virtual machine.
New-AzVm `
-ResourceGroupName "TestResourceGroup" `
-Name "test-wp1-eus-vm" `
-Location "East US" `
-VirtualNetworkName "test-wp1-eus-network" `
-SubnetName "default" `
-SecurityGroupName "test-wp1-eus-nsg" `
-PublicIpAddressName "test-wp1-eus-pubip" `
-OpenPorts 80,3389
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment