編輯

共用方式為


New-AzPeeringConnectionMonitorTest

Creates or updates a connection monitor test with the specified name under the given subscription, resource group and peering service.

Syntax

New-AzPeeringConnectionMonitorTest
   -Name <String>
   -PeeringServiceName <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String>]
   [-Destination <String>]
   [-DestinationPort <Int32>]
   [-SourceAgent <String>]
   [-TestFrequencyInSec <Int32>]
   [-DefaultProfile <PSObject>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

Creates or updates a connection monitor test with the specified name under the given subscription, resource group and peering service.

Examples

Example 1: Create a new connection monitor test

New-AzPeeringConnectionMonitorTest -Name TestName -PeeringServiceName DRTest -ResourceGroupName DemoRG

SourceAgent Destination DestinationPort TestFrequency Sucessful ProvisioningState
----------- ----------- --------------- ------------- --------- -----------------
Agent 1     1.1.1.1     80              30            True      Succeeded

Creates a connection monitor test for the peering service

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 DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.

Type:PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Destination

The Connection Monitor test destination

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

-DestinationPort

The Connection Monitor test destination port

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

-Name

The name of the connection monitor test

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

-PeeringServiceName

The name of the peering service.

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

-ResourceGroupName

The name of the resource group.

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

-SourceAgent

The Connection Monitor test source agent

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

-SubscriptionId

The Azure subscription ID.

Type:String
Position:Named
Default value:(Get-AzContext).Subscription.Id
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-TestFrequencyInSec

The Connection Monitor test frequency in seconds

Type:Int32
Position:Named
Default value:None
Required:False
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

Outputs

IConnectionMonitorTest