Skip to content

Commit 79c5c69

Browse files
Merge pull request #311920 from asudbring/tsk544796-sfi-ssh
Remove unnecessary Bastion and fix VM creation in Network Watcher IP flow verify PowerShell quickstart
2 parents 3b773f3 + 68578d9 commit 79c5c69

1 file changed

Lines changed: 25 additions & 6 deletions

File tree

articles/network-watcher/diagnose-vm-network-traffic-filtering-problem-powershell.md

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ author: halkazwini
66
ms.author: halkazwini
77
ms.service: azure-network-watcher
88
ms.topic: quickstart
9-
ms.date: 09/23/2025
9+
ms.date: 02/17/2026
1010
ms.custom: devx-track-azurepowershell, mode-api
1111

1212
# Customer intent: "As a cloud administrator, I want to diagnose network traffic filter issues on a virtual machine using IP flow verify, so that I can identify and resolve security rules causing connectivity problems."
@@ -41,10 +41,10 @@ In this section, you create a virtual network and a subnet in the East US region
4141
New-AzResourceGroup -Name 'myResourceGroup' -Location 'eastus'
4242
```
4343
44-
1. Create a subnet configuration for the virtual machine subnet and the Bastion host subnet using [New-AzVirtualNetworkSubnetConfig](/powershell/module/az.network/new-azvirtualnetworksubnetconfig).
44+
1. Create a subnet configuration for the virtual machine subnet using [New-AzVirtualNetworkSubnetConfig](/powershell/module/az.network/new-azvirtualnetworksubnetconfig).
4545
4646
```azurepowershell-interactive
47-
# Create subnets configuration.
47+
# Create subnet configuration.
4848
$Subnet = New-AzVirtualNetworkSubnetConfig -Name 'mySubnet' -AddressPrefix '10.0.0.0/24'
4949
```
5050
@@ -62,11 +62,30 @@ In this section, you create a virtual network and a subnet in the East US region
6262
New-AzNetworkSecurityGroup -Name 'myVM-nsg' -ResourceGroupName 'myResourceGroup' -Location 'eastus'
6363
```
6464
65-
1. Create a virtual machine using [New-AzVM](/powershell/module/az.compute/new-azvm). When prompted, enter a username and password.
65+
1. Create a virtual machine using [New-AzVM](/powershell/module/az.compute/new-azvm).
6666
6767
```azurepowershell-interactive
68-
# Create a Linux virtual machine using the latest Ubuntu 20.04 LTS image.
69-
New-AzVm -ResourceGroupName 'myResourceGroup' -Name 'myVM' -Location 'eastus' -VirtualNetworkName 'myVNet' -SubnetName 'mySubnet' -SecurityGroupName 'myVM-nsg' -Image 'Canonical:0001-com-ubuntu-server-focal:20_04-lts-gen2:latest'
68+
# Create a credential object
69+
$securePassword = ConvertTo-SecureString ' ' -AsPlainText -Force
70+
$cred = New-Object System.Management.Automation.PSCredential ('azureuser', $securePassword)
71+
72+
# Define the virtual machine parameters
73+
$vmParams = @{
74+
ResourceGroupName = 'myResourceGroup'
75+
Location = 'eastus'
76+
Name = 'myVM'
77+
Image = 'Ubuntu2204'
78+
Credential = $cred
79+
VirtualNetworkName = 'myVNet'
80+
SubnetName = 'mySubnet'
81+
SecurityGroupName = 'myVM-nsg'
82+
PublicIpAddressName = ''
83+
SshKeyName = 'mySSHKey'
84+
GenerateSshKey = $true
85+
}
86+
87+
# Create the virtual machine
88+
New-AzVM @vmParams
7089
```
7190
7291
## Test network communication using IP flow verify

0 commit comments

Comments
 (0)