Bewerken

Delen via


Remove-AzVirtualWan

Removes an Azure Virtual WAN.

Syntax

Remove-AzVirtualWan
      -ResourceGroupName <String>
      -Name <String>
      [-Force]
      [-PassThru]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-AzVirtualWan
      -InputObject <PSVirtualWan>
      [-Force]
      [-PassThru]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]
Remove-AzVirtualWan
      -ResourceId <String>
      [-Force]
      [-PassThru]
      [-DefaultProfile <IAzureContextContainer>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

Removes an Azure Virtual WAN.

Examples

Example 1

New-AzResourceGroup -Name "TestResourceGroup" -Location "Central US"
New-AzVirtualWan -Name "MyVirtualWan" -ResourceGroupName "TestResourceGroup" -Location "Central US"
Remove-AzVirtualWan -Name "MyVirtualWan" -ResourceGroupName "TestResourceGroup" -Passthru

This example creates a Virtual WAN in a resource group and then immediately deletes it. To suppress the prompt when deleting the Virtual WAN, use the -Force flag.

Example 2

New-AzResourceGroup -Name "TestResourceGroup" -Location "Central US"
$virtualWan = New-AzVirtualWan -Name "MyVirtualWan" -ResourceGroupName "TestResourceGroup" -Location "Central US"
Remove-AzVirtualWan -InputObject $virtualWan -Passthru

This example creates a Virtual WAN in a resource group and then immediately deletes it. This deletion happens using the virtual wan object returned by New-AzVirtualWan. To suppress the prompt when deleting the Virtual WAN, use the -Force flag.

Example 3

New-AzResourceGroup -Name "TestResourceGroup" -Location "Central US"
$virtualWan = New-AzVirtualWan -Name "MyVirtualWan" -ResourceGroupName "TestResourceGroup" -Location "Central US"
Remove-AzVirtualWan -ResourceId $virtualWan.Id -Passthru

This example creates a Virtual WAN in a resource group and then immediately deletes it. This deletion happens using the virtual wan resource id returned by New-AzVirtualWan. To suppress the prompt when deleting the Virtual WAN, use the -Force flag.

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

-Force

Do not ask for confirmation.

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

-InputObject

The virtual wan object to be deleted.

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

-Name

The virtual wan name.

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

-PassThru

Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
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 Azure resource ID for the virtual wan to be deleted.

Type:String
Aliases:VirtualWanId
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

PSVirtualWan

String

Outputs

Boolean