편집

다음을 통해 공유


Convert-AzNetworkWatcherClassicConnectionMonitor

Convert a classic connection monitor into connection monitor v2 with specified name.

Syntax

Convert-AzNetworkWatcherClassicConnectionMonitor
       -NetworkWatcherName <String>
       -ResourceGroupName <String>
       -Name <String>
       [-DefaultProfile <IAzureContextContainer>]
       [-WhatIf]
       [-Confirm]
       [<CommonParameters>]

Description

The Convert-AzNetworkWatcherClassicConnectionMonitor cmdlet returns the connection monitor V2 with the specified name corresponding to the specified network watcher and resource group.

Examples

Example 1

$nw = Get-AzResource | Where-Object {$_.ResourceType -eq "Microsoft.Network/networkWatchers" -and $_.Location -eq "centraluseuap" }
Convert-AzNetworkWatcherClassicConnectionMonitor -NetworkWatcherName $nw.Name -ResourceGroupName $nw.ResourceGroupName -Name "classicCm1"

Migration is successful.

Passing the classic connection monitor name and corresponding network watcher name and its resource group name.

Example 2

$nw = Get-AzResource | Where-Object {$_.ResourceType -eq "Microsoft.Network/networkWatchers" -and $_.Location -eq "centraluseuap" }
Convert-AzNetworkWatcherClassicConnectionMonitor -NetworkWatcherName $nw.Name -ResourceGroupName $nw.ResourceGroupName -Name "testCmv2"

This Connection Monitor is already V2

Passing the V2 connection monitor name and corresponding network watcher name and its resource group name.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
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
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

The classic connection monitor name.

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

-NetworkWatcherName

The name of network watcher.

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

-ResourceGroupName

The name of the network watcher resource group.

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
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
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

None

Outputs

PSConnectionMonitorResultV1

PSConnectionMonitorResultV2