Modifier

Partager via


Reset-AzHubRouter

Resets the RoutingState of a VirtualHub resource.

Syntax

Reset-AzHubRouter
     -InputObject <PSVirtualHub>
     [-AsJob]
     [-DefaultProfile <IAzureContextContainer>]
     [-WhatIf]
     [-Confirm]
     [<CommonParameters>]
Reset-AzHubRouter
     -ResourceGroupName <String>
     -Name <String>
     [-AsJob]
     [-DefaultProfile <IAzureContextContainer>]
     [-WhatIf]
     [-Confirm]
     [<CommonParameters>]
Reset-AzHubRouter
     -ResourceId <String>
     [-AsJob]
     [-DefaultProfile <IAzureContextContainer>]
     [-WhatIf]
     [-Confirm]
     [<CommonParameters>]

Description

Resets the Routing State of an existing VirtualHub resource only if the Routing State of the virtual hub is not Provisioned.

Examples

Example 1

Reset-AzHubRouter -ResourceGroupName "testRG" -Name "westushub"

Reset the routing state of the virtual hub using its ResourceGroupName and ResourceName.

Example 2

Reset-AzHubRouter -ResourceId "/subscriptions/testSub/resourceGroups/testRG/providers/Microsoft.Network/virtualHubs/westushub"

Reset the routing state of the virtual hub using its ResourceId.

Example 3

Reset-AzHubRouter -InputObject $virtualHub

Reset the routing state of the virtual hub using an input object. The input object is of type PSVirtualHub.

Example 4

Get-AzVirtualHub -ResourceGroupName "testRG" -Name "westushub" | Reset-AzHubRouter

An existing virtual hub object can be retrieved and then passed as input object to Reset-AzHubRouter.

Parameters

-AsJob

Run cmdlet in the background

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

-InputObject

The Virtual hub object to be modified.

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

-Name

The resource name.

Type:String
Aliases:ResourceName, VirtualHubName, HubName
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

The resource group name.

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

-ResourceId

The resource id of the Virtual hub to be modified.

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

Inputs

String

PSVirtualHub

Outputs

PSVirtualHub