Set-AzNetworkWatcherConnectionMonitor

Updates connection monitor resource.

Syntax

Set-AzNetworkWatcherConnectionMonitor
   -NetworkWatcherName <String>
   -ResourceGroupName <String>
   -Name <String>
   -SourceResourceId <String>
   -MonitoringIntervalInSeconds <Int32>
   [-SourcePort <Int32>]
   [-DestinationResourceId <String>]
   -DestinationPort <Int32>
   [-DestinationAddress <String>]
   [-ConfigureOnly]
   [-Tag <Hashtable>]
   [-Force]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzNetworkWatcherConnectionMonitor
   -NetworkWatcher <PSNetworkWatcher>
   -Name <String>
   -SourceResourceId <String>
   -MonitoringIntervalInSeconds <Int32>
   [-SourcePort <Int32>]
   [-DestinationResourceId <String>]
   -DestinationPort <Int32>
   [-DestinationAddress <String>]
   [-ConfigureOnly]
   [-Tag <Hashtable>]
   [-Force]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzNetworkWatcherConnectionMonitor
   -NetworkWatcher <PSNetworkWatcher>
   -Name <String>
   [-TestGroup <PSNetworkWatcherConnectionMonitorTestGroupObject[]>]
   [-Output <PSNetworkWatcherConnectionMonitorOutputObject[]>]
   [-Note <String>]
   [-Tag <Hashtable>]
   [-Force]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzNetworkWatcherConnectionMonitor
   -NetworkWatcherName <String>
   -ResourceGroupName <String>
   -Name <String>
   [-TestGroup <PSNetworkWatcherConnectionMonitorTestGroupObject[]>]
   [-Output <PSNetworkWatcherConnectionMonitorOutputObject[]>]
   [-Note <String>]
   [-Tag <Hashtable>]
   [-Force]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzNetworkWatcherConnectionMonitor
   -Location <String>
   -Name <String>
   -SourceResourceId <String>
   -MonitoringIntervalInSeconds <Int32>
   [-SourcePort <Int32>]
   [-DestinationResourceId <String>]
   -DestinationPort <Int32>
   [-DestinationAddress <String>]
   [-ConfigureOnly]
   [-Tag <Hashtable>]
   [-Force]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzNetworkWatcherConnectionMonitor
   -Location <String>
   -Name <String>
   [-TestGroup <PSNetworkWatcherConnectionMonitorTestGroupObject[]>]
   [-Output <PSNetworkWatcherConnectionMonitorOutputObject[]>]
   [-Note <String>]
   [-Tag <Hashtable>]
   [-Force]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzNetworkWatcherConnectionMonitor
   -ResourceId <String>
   -SourceResourceId <String>
   -MonitoringIntervalInSeconds <Int32>
   [-SourcePort <Int32>]
   [-DestinationResourceId <String>]
   -DestinationPort <Int32>
   [-DestinationAddress <String>]
   [-ConfigureOnly]
   -Tag <Hashtable>
   [-Force]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzNetworkWatcherConnectionMonitor
   -ResourceId <String>
   -TestGroup <PSNetworkWatcherConnectionMonitorTestGroupObject[]>
   -Output <PSNetworkWatcherConnectionMonitorOutputObject[]>
   -Note <String>
   -Tag <Hashtable>
   [-Force]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzNetworkWatcherConnectionMonitor
   -InputObject <PSConnectionMonitorResult>
   [-Force]
   [-AsJob]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The Set-AzNetworkWatcherConnectionMonitor cmdlet updates connection monitor resource.

Examples

Example 1: Update a connection monitor

PS C:\> Set-AzNetworkWatcherConnectionMonitor -Location centraluseuap -Name cm -SourceResourceId /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RgCentralUSEUAP/providers/Microsoft.Compute/virtualMachines/vm
-DestinationAddress google.com -DestinationPort 80 -Tag @{"key1" = "value1"}

Name                        : cm
Id                          : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGro
                              ups/NetworkWatcherRG/providers/Microsoft.Network/networkWatcher
                              s/NetworkWatcher_centraluseuap/connectionMonitors/cm
Etag                        : W/"5b2b20e8-0ce0-417e-9607-76208149bb67"
ProvisioningState           : Succeeded
Source                      : {
                                "ResourceId": "/subscriptions/00000000-0000-0000-0000-0000000
                                00000/RgCentralUSEUAP/providers/Microsoft.Compute/virtualMach
                                ines/vm",
                                "Port": 0
                              }
Destination                 : {
                                "Address": "google.com",
                                "Port": 80
                              }
MonitoringIntervalInSeconds : 60
AutoStart                   : True
StartTime                   : 1/12/2018 7:19:28 PM
MonitoringStatus            : Running
Location                    : centraluseuap
Type                        : Microsoft.Network/networkWatchers/connectionMonitors
Tags                        : {
                                "key1": "value1"
                              }

In this example we update existing connection monitor by changing destinationAddress and adding tags.

Parameters

-AsJob

Run cmdlet in the background

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-ConfigureOnly

Configure connection monitor, but do not start it

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DestinationAddress

Address of the connection monitor destination (IP or domain name).

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DestinationPort

The destination port used by connection monitor.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-DestinationResourceId

The ID of the resource used as the destination by connection monitor.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Force

Do not ask for confirmation if you want to overwrite a resource

Type:SwitchParameter
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-InputObject

Connection monitor object.

Type:PSConnectionMonitorResult
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-Location

Location of the network watcher.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-MonitoringIntervalInSeconds

Monitoring interval in seconds. Default value is 60 seconds.

Type:Nullable<T>[Int32]
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Name

The connection monitor name.

Type:String
Aliases:ConnectionMonitorName
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-NetworkWatcher

The network watcher resource.

Type:PSNetworkWatcher
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-NetworkWatcherName

The name of network watcher.

Type:String
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-Note

Notes associated with connection monitor.

Type:String
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-Output

Describes a connection monitor output destinations.

Type:PSNetworkWatcherConnectionMonitorOutputObject[]
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-ResourceGroupName

The name of the network watcher resource group.

Type:String
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-ResourceId

ConnectionMonitor resource ID.

Type:String
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-SourcePort

The source port used by connection monitor.

Type:Int32
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-SourceResourceId

The ID of the resource used as the source by connection monitor.

Type:String
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False
-Tag

A hashtable which represents resource tags.

Type:Hashtable
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-TestGroup

The list of test groups.

Type:PSNetworkWatcherConnectionMonitorTestGroupObject[]
Position:Named
Default value:None
Accept pipeline input:True
Accept wildcard characters:False
-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:None
Accept pipeline input:False
Accept wildcard characters:False

Inputs

PSNetworkWatcher

String

PSConnectionMonitorResult

Outputs

PSConnectionMonitorResultV1

PSConnectionMonitorResultV2