Compartilhar via


Uninstall-RemoteAccess

Uninstall-RemoteAccess

Uninstalls DirectAccess (DA) and VPN, both Remote Access (RA) VPN and site-to-site VPN.

Syntax

Parameter Set: Uninstall2
Uninstall-RemoteAccess [-AsJob] [-CimSession <CimSession[]> ] [-ComputerName <String> ] [-EntrypointName <String> ] [-Force] [-ThrottleLimit <Int32> ] [-VpnType <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Unistall-RemoteAccess cmdlet uninstalls DirectAccess (DA) and VPN, both Remote Access (RA) VPN and site-to-site VPN.

Users should indicate which RA technology to uninstall using the appropriate parameter. If none of the technologies are specified, then everything gets uninstalled.
This cmdlet will not handle removal of RA role and other dependent roles.
Following is the list of scenarios supported or not supported by this cmdlet.

Single Site.
-- If only VPN or S2S VPN has been configured, then it can be un-configured.
-- If both DA and VPN have been configured, then VPN can be un-configured but DA alone cannot be un-configured.
-- If both DA and S2S VPN have been configured, then S2S VPN can be un-configured but DA alone cannot be un-configured.
-- If only DA is configured, then it can be un-configured.

Load balanced cluster.
-- If both DA and VPN have been configured.
---- VPN can be un-configured. Since VPN is configured for the cluster, removing it will remove VPN from the entire cluster.
---- Both DA and VPN can be un-configured. This will remove the cluster settings as well as the RA settings from the deployment.
-- If both DA and S2S VPN have been configured.
---- DA and S2S VPN can be un-configured. Note: The S2S VPN can only be removed from the Computer mentioned in the cmdlet. If it is present on other nodes in the deployment, it will not be removed from there.
-- If only DA has been configured, then it can be un-configured as well. This will remove the cluster settings as well as the DA settings from the deployment and bring it to un-configured state. To uninstall DA on one of the nodes in a load balancing cluster, remove the node from the cluster using the Remove-RemoteAccessLoadBalancerNode cmdlet.

Multi-site deployment.
-- If both DA and VPN have been configured.
---- VPN can be un-configured. Since VPN is configured for a particular entry point, removing it will remove VPN from the entry point. If there are multiple entrypoints in a deployment and VPN needs to be uninstalled completely, then it has to be uninstalled from each entry point separately.
---- Both DA and VPN can be un-configured. This will remove the cluster settings as well as the RA settings from the deployment.
-- If both DA and S2S VPN have been configured.
---- DA and S2S VPN can be un-configured. Note: The S2S VPN can only be removed from the computer mentioned in the cmdlet. If it is present on other nodes in the deployment, it will not be removed from there.
-- If only DA has been configured, it can be un-configured as well. This will remove DA settings from all the entry points in the deployment and bring it to un-configured state. To uninstall DA from an entry point, use the Remove-DAEntryPoint cmdlet.

Parameters

-AsJob

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-CimSession<CimSession[]>

Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.

Aliases

Session

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ComputerName<String>

Specifies the IPv4 orIPv6 address, or host name, of the computer on which the RA server computer specific tasks should be run. If this parameter is specified and a user is trying to uninstall VPN then VPN on this RA server is uninstalled.

Aliases

Cn

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-EntrypointName<String>

Specifies to the identity of a site in a multi-site deployment where VPN needs to be uninstalled. It is not applicable to DA.
If this parameter is not specified then the entry point name to which the server on which the cmdlet is run is used. The server could also be represented using the ComputerName parameter.
If both this parameter and ComputerName parameter are specified and the computer name does not belong to the site represented by the entry point name, then this parameter takes precedence and VPN is uninstalled at the site indicated by it.
Note: In a multi-site deployment case, a VPN can only be uninstalled one site at a time.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Force

Forces the command to run without asking for user confirmation.
When suppressed the cmdlet assumes user confirmation for the following conditions.
-- Uninstalling RA, after which users will not be able to connect remotely to corporate network.
-- If NLS is on DA server, then uninstallation will lead to decommissioning of the NLS URL and clients that have not received updated policies will always be detected to be outside corporate network and will not be able to access corporate resources when inside corporate network.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ThrottleLimit<Int32>

Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VpnType<String>

Specifies the type of VPN that should be uninstalled. The acceptable values for this parameter are:
-- Vpn.
-- VpnS2S.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • None

Outputs

The output type is the type of the objects that the cmdlet emits.

  • None

Examples

EXAMPLE 1

This example uninstalls DA from all sites. Before uninstalling it warns the users of the after effects. Since the NLS is running on the DA server in this case the warning also describes the impact of uninstallation on the connectivity of clients when inside corporate network.

PS C:\> Uninstall-RemoteAccess

EXAMPLE 2

This example removes a VPN. This cmdlet will first prompt to confirm before uninstalling a VPN.

PS C:\> Uninstall-RemoteAccess -VPNType VPN

EXAMPLE 3

This example uninstalls DA and VPN in a single site installation. When run the cmdlets uninstalls both DA and VPN. Care should be taken not to run this cmdlet flavor in a multisite environment with S2S VPN, since it would lead to a rather unexpected behavior where DA is un-installed and S2S VPN is uninstalled from the current computer, but the other end-point of the S2S VPN on a different computer or server will not be uninstalled.

PS C:\> Uninstall-RemoteAccess

Get-RemoteAccess

Install-RemoteAccess

Remove-DAEntryPoint

Remove-RemoteAccessLoadBalancerNode

Set-RemoteAccess