Skip to content

Commit aaf0753

Browse files
(AzureCXP) fixed Powershell Sample
updated AzurePowershell cmdlets to reflect the correct parameters. In line 52, added the parameter "-AzureVM" In line 54, added the parameter "-ExternalAddress" In line 54, changed the parameter "-name" to "-Name" resolves MicrosoftDocs/azure-docs#104152
1 parent 57e11ec commit aaf0753

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

articles/network-watcher/connection-monitor-create-using-powershell.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,9 @@ Select-AzSubscription -SubscriptionId <your-subscription>
4949
//Select region
5050
$nw = "NetworkWatcher_centraluseuap"
5151
//Declare endpoints like Azure VM below. You can also give VNET,Subnet,Log Analytics workspace
52-
$sourcevmid1 = New-AzNetworkWatcherConnectionMonitorEndpointObject -Name MyAzureVm -ResourceID /subscriptions/<your-subscription>/resourceGroups/<your resourceGroup>/providers/Microsoft.Compute/virtualMachines/<vm-name>
52+
$sourcevmid1 = New-AzNetworkWatcherConnectionMonitorEndpointObject -AzureVM -Name MyAzureVm -ResourceID /subscriptions/<your-subscription>/resourceGroups/<your resourceGroup>/providers/Microsoft.Compute/virtualMachines/<vm-name>
5353
//Declare endpoints like URL, IPs
54-
$bingEndpoint = New-AzNetworkWatcherConnectionMonitorEndpointObject -name Bing -Address www.bing.com # Destination URL
54+
$bingEndpoint = New-AzNetworkWatcherConnectionMonitorEndpointObject -ExternalAddress -Name Bing -Address www.bing.com # Destination URL
5555
//Create test configuration.Choose Protocol and parametersSample configs below.
5656
5757
$IcmpProtocolConfiguration = New-AzNetworkWatcherConnectionMonitorProtocolConfigurationObject -IcmpProtocol

0 commit comments

Comments
 (0)