Export (0) Print
Expand All
Expand Minimize

Uninstall-RemoteAccess

Windows Server 2012 R2 and Windows 8.1

Updated: September 24, 2014

Applies To: Windows 8.1, Windows PowerShell 4.0, Windows Server 2012 R2

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

Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete. The cmdlet immediately returns an object that represents the job and then displays the command prompt. You can continue to work in the session while the job completes. To manage the job, use the *-Job cmdlets. To get the job results, use the Receive-Job cmdlet. For more information about Windows PowerShell® background jobs, see about_Jobs.


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 the name of a site in a multisite deployment. The cmdlet uninstalls VPN on this site. In a multisite deployment, you must uninstall VPN on one site at a time. This parameter does not apply to DA.
If you do not specify this parameter, the cmdlet uses the name of the entry point for the server on which you run the cmdlet. You can use the ComputerName parameter to specify the computer that runs the cmdlet. If you specify both this parameter and the ComputerName parameter, and the computer that you specify in the ComputerName parameter is not the host of the site that you specify in this parameter, the cmdlet uses the site that you specify in this parameter.


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.

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
Confirm 
If Remote Access is uninstalled, remote clients will not be able to connect to the corporate network via DirectAccess. The network location server running on the Remote Access server will be disabled, and DirectAccess clients will not be able to use it to detect their location. This will cause loss of connectivity to internal resources for clients located in the corporate network. Do you want to continue? 
 
[Y] Yes  [N] No  [S] Suspend  [?] Help  (default is ꞌYꞌ): Y 

EXAMPLE 2

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


 

PS C:\> Uninstall-RemoteAccess -VPNType VPN
Confirm 
If RemoteAccess is uninstalled, remote clients will not be able to connect to corporate network via VPN. Do you want to continue? 
 
[Y] Yes  [N] No  [S] Suspend  [?] Help  (default is ꞌYꞌ): Y 

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
Confirm 
If Remote Access is uninstalled, remote clients will not be able to connect to the corporate network via 
DirectAccess + Vpn. Do you want to continue? 
 
[Y] Yes  [N] No  [S] Suspend  [?] Help  (default is ꞌYꞌ): Y 

Related topics

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft