New-AzNetworkWatcherConnectionMonitor
Creates a connection monitor resource.
Syntax
SetByName (Default)
New-AzNetworkWatcherConnectionMonitor
-NetworkWatcherName <String>
-ResourceGroupName <String>
-Name <String>
-SourceResourceId <String>
-DestinationPort <Int32>
[-MonitoringIntervalInSeconds <Int32>]
[-SourcePort <Int32>]
[-DestinationResourceId <String>]
[-DestinationAddress <String>]
[-ConfigureOnly]
[-Tag <Hashtable>]
[-Force]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
SetByResource
New-AzNetworkWatcherConnectionMonitor
-NetworkWatcher <PSNetworkWatcher>
-Name <String>
-SourceResourceId <String>
-DestinationPort <Int32>
[-MonitoringIntervalInSeconds <Int32>]
[-SourcePort <Int32>]
[-DestinationResourceId <String>]
[-DestinationAddress <String>]
[-ConfigureOnly]
[-Tag <Hashtable>]
[-Force]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
SetByResourceV2
New-AzNetworkWatcherConnectionMonitor
-NetworkWatcher <PSNetworkWatcher>
-Name <String>
-TestGroup <PSNetworkWatcherConnectionMonitorTestGroupObject[]>
[-Output <PSNetworkWatcherConnectionMonitorOutputObject[]>]
[-Note <String>]
[-Tag <Hashtable>]
[-Force]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
SetByNameV2
New-AzNetworkWatcherConnectionMonitor
-NetworkWatcherName <String>
-ResourceGroupName <String>
-Name <String>
-TestGroup <PSNetworkWatcherConnectionMonitorTestGroupObject[]>
[-Output <PSNetworkWatcherConnectionMonitorOutputObject[]>]
[-Note <String>]
[-Tag <Hashtable>]
[-Force]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
SetByLocation
New-AzNetworkWatcherConnectionMonitor
-Location <String>
-Name <String>
-SourceResourceId <String>
-DestinationPort <Int32>
[-MonitoringIntervalInSeconds <Int32>]
[-SourcePort <Int32>]
[-DestinationResourceId <String>]
[-DestinationAddress <String>]
[-ConfigureOnly]
[-Tag <Hashtable>]
[-Force]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
SetByLocationV2
New-AzNetworkWatcherConnectionMonitor
-Location <String>
-Name <String>
-TestGroup <PSNetworkWatcherConnectionMonitorTestGroupObject[]>
[-Output <PSNetworkWatcherConnectionMonitorOutputObject[]>]
[-Note <String>]
[-Tag <Hashtable>]
[-Force]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
SetByConnectionMonitorV2Object
New-AzNetworkWatcherConnectionMonitor
-ConnectionMonitor <PSNetworkWatcherConnectionMonitorObject>
[-Force]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The New-AzNetworkWatcherConnectionMonitor cmdlet creates a connection monitor resource for specified source and destination (SingleSourcedestination connection monitor) or set of test groups (MultiEndpointConnectionMonitor).
Examples
Example 1
New-AzNetworkWatcherConnectionMonitor -NetworkWatcher $nw -Name cm -SourceResourceId /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/RgCentralUSEUAP/providers/Microsoft.Compute/virtualMachines/vm -DestinationAddress bing.com -DestinationPort 80
Name : cm
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGro
ups/NetworkWatcherRG/providers/Microsoft.Network/networkWatcher
s/NetworkWatcher_centraluseuap/connectionMonitors/t1
Etag : W/"e86b28cf-b907-4475-a8b7-34d310367694"
ProvisioningState : Succeeded
Source : {
"ResourceId": "/subscriptions/00000000-0000-0000-0000-0000000
00000/resourceGroups/RgCentralUSEUAP/providers/Microsoft
.Compute/virtualMachines/vm",
"Port": 0
}
Destination : {
"Address": "bing.com",
"Port": 80
}
MonitoringIntervalInSeconds : 60
AutoStart : True
StartTime : 1/12/2018 7:13:11 PM
MonitoringStatus : Running
Location : centraluseuap
Type : Microsoft.Network/networkWatchers/connectionMonitors
Tags : {}
Parameters
-AsJob
Run cmdlet in the background
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
Configure connection monitor, but do not start it
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
SetByName
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
SetByResource
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
SetByLocation
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: cf
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ConnectionMonitor
Connection monitor object.
Parameter properties
Parameter sets
SetByConnectionMonitorV2Object
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
Type: IAzureContextContainer
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzContext, AzureRmContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DestinationAddress
Address of the connection monitor destination (IP or domain name).
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
SetByName
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
SetByResource
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
SetByLocation
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DestinationPort
The destination port used by connection monitor.
Parameter properties
Type: Int32
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
SetByName
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
SetByResource
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
SetByLocation
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DestinationResourceId
The ID of the resource used as the destination by connection monitor.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
SetByName
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
SetByResource
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
SetByLocation
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Force
Do not ask for confirmation if you want to overwrite a resource
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Location
Location of the network watcher.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
SetByLocation
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
SetByLocationV2
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-MonitoringIntervalInSeconds
Monitoring interval in seconds. Default value is 60 seconds.
Parameter properties
Type: Nullable<T> [ Int32 ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
SetByName
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
SetByResource
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
SetByLocation
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Name
The connection monitor name.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: ConnectionMonitorName
Parameter sets
SetByName
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
SetByResource
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
SetByResourceV2
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
SetByNameV2
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
SetByLocation
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
SetByLocationV2
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-NetworkWatcher
The network watcher resource.
Parameter properties
Type: PSNetworkWatcher
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
SetByResource
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
SetByResourceV2
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-NetworkWatcherName
The name of network watcher.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
SetByName
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
SetByNameV2
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Note
Notes associated with connection monitor.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
SetByResourceV2
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
SetByNameV2
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
SetByLocationV2
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Output
Describes a connection monitor output destinations.
Parameter properties
Parameter sets
SetByResourceV2
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
SetByNameV2
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
SetByLocationV2
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroupName
The name of the network watcher resource group.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
SetByName
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
SetByNameV2
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SourcePort
The source port used by connection monitor.
Parameter properties
Type: Int32
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
SetByName
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
SetByResource
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
SetByLocation
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SourceResourceId
The ID of the resource used as the source by connection monitor.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
SetByName
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
SetByResource
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
SetByLocation
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Tag
A hashtable which represents resource tags.
Parameter properties
Type: Hashtable
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
SetByName
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
SetByResource
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
SetByResourceV2
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
SetByNameV2
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
SetByLocation
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
SetByLocationV2
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-TestGroup
The list of test groups.
Parameter properties
Parameter sets
SetByResourceV2
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
SetByNameV2
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
SetByLocationV2
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Parameter properties
Type: SwitchParameter
Default value: None
Supports wildcards: False
DontShow: False
Aliases: wi
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs