Disconnect-AzP2SVpnGatewayVpnConnection
Disconnect given connected vpn client connections with a given p2s vpn gateway
Note
This is the previous version of our documentation. Please consult the most recent version for up-to-date information.
Syntax
Disconnect-AzP2SVpnGatewayVpnConnection
-Name <String>
-ResourceGroupName <String>
-VpnConnectionId <VpnConnectionId>
[<CommonParameters>]
Disconnect-AzP2SVpnGatewayVpnConnection
-InputObject <PSP2SVpnGateway>
-VpnConnectionId <VpnConnectionId>
[<CommonParameters>]
Disconnect-AzP2SVpnGatewayVpnConnection
-ResourceId <String>
-VpnConnectionId <VpnConnectionId>
[<CommonParameters>]
Description
The Disconnect-AzP2sVpnGatewayVpnConnection cmdlet enables you to disconnect given current point to site connection from P2SVpnGateway.
Examples
Example 1
PS C:\> Disconnect-AzP2sVpnGatewayVpnConnection -ResourceName 683482ade8564515aed4b8448c9757ea-westus-gw -ResourceGroupName P2SCortexGATesting -VpnConnectionId @("IKEv2_7e1cfe59-5c7c-4315-a876-b11fbfdfeed4")
ResourceGroupName : P2SCortexGATesting
Name : 683482ade8564515aed4b8448c9757ea-westus-gw
Id : /subscriptions/b1f1deed-af60-4bab-9223-65d340462e24/resourceGroups/P2SCortexGATesting/providers/Microsoft.Network/p2sVpnGateways/683482ade8564515a
ed4b8448c9757ea-westus-gw
Location : westus
VpnGatewayScaleUnit : 1
VirtualHub : /subscriptions/b1f1deed-af60-4bab-9223-65d340462e24/resourceGroups/P2SCortexGATesting/providers/Microsoft.Network/virtualHubs/WestUsVirtualHub
VpnServerConfiguration : /subscriptions/b1f1deed-af60-4bab-9223-65d340462e24/resourceGroups/P2SCortexGATesting/providers/Microsoft.Network/vpnServerConfigurations/WestUsConfig
VpnServerConfigurationLocation :
VpnClientConnectionHealth : null
Type : Microsoft.Network/p2sVpnGateways
ProvisioningState : Succeeded
P2SConnectionConfigurations : [
{
"ProvisioningState": "Succeeded",
"VpnClientAddressPool": {
"AddressPrefixes": [
"192.168.2.0/24"
]
},
"Name": "P2SConnectionConfigDefault",
"Etag": "W/\"4b96e6a2-b4d8-46b3-9210-76d40f359bef\"",
"Id": "/subscriptions/b1f1deed-af60-4bab-9223-65d340462e24/resourceGroups/P2SCortexGATesting/providers/Microsoft.Network/p2sVpnGateways/683482
ade8564515aed4b8448c9757ea-westus-gw/p2sConnectionConfigurations/P2SConnectionConfigDefault"
}
]
Parameters
-InputObject
The p2s vpn gateway object to be modified
| Type: | PSP2SVpnGateway |
| Aliases: | P2SVpnGateway |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
-Name
The resource name.
| Type: | String |
| Aliases: | ResourceName |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
-ResourceGroupName
The resource group name.
| Type: | String |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |
-ResourceId
P2s Virtual network gateway resource Id
| Type: | String |
| Aliases: | ResourceId |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | True |
| Accept wildcard characters: | False |
-VpnConnectionId
Vpn Connection Ida
| Type: | String[] |
| Aliases: | VpnConnectionId |
| Position: | Named |
| Default value: | None |
| Accept pipeline input: | False |
| Accept wildcard characters: | False |