Remove-RASGateway
Removes a RAS Secure Gateway server from a site.
Remove-RASGateway [-Id] <uint> [-NoUninstall <SwitchParameter>] [<CommonParameters>] Remove-RASGateway [-Id] <uint> -Password <SecureString> -Username <string> [<CommonParameters>] Remove-RASGateway [-InputObject] <Gateway> [-NoUninstall <SwitchParameter>] [<CommonParameters>] Remove-RASGateway [-InputObject] <Gateway> -Password <SecureString> -Username <string> [<CommonParameters>] Remove-RASGateway [-Server] <string> [[-SiteId] <uint>] [-NoUninstall <SwitchParameter>] [<CommonParameters>] Remove-RASGateway [-Server] <string> [[-SiteId] <uint>] -Password <SecureString> -Username <string> [<CommonParameters>]
Removes a specified RAS Secure Gateway server from a site. The cmdlet will also uninstall the Gateway software from the server by default. You can optionally keep the Gateway software by including the -NoUninstall parameter.
-Server <string> The name of a Secure Gateway server to remove from the site. The name can be either FQDN or IP address, but you have to enter the actual name this server has in the RAS farm.
-SiteId <uint> Site ID from which to remove the specified Secure Gateway. If the parameter is omitted, the site ID of the Licensing Server will be used.
-Id <uint> The ID of the Secure Gateway to remove. To obtain the ID of a Secure Gateway, use the Get-RASGateway cmdlet.
-NoUninstall <SwitchParameter> When this parameter is included, the Secure Gateway software will not be removed from the server. If you want to remove the software, omit this parameter. When removing the software, your RAS admin credentials will be used to remotely execute the uninstaller on the target server. You can specify different credentials if needed using the Username and Password parameters.
-Username <string> An administrator account name to remotely uninstall the Secure Gateway software from the server. If this parameter is omitted, your RAS admin username (and password) will be used.
-Password <SecureString> The password of the account specified in the Username parameter.
-InputObject <Gateway> The Secure Gateway object to remove from a site. To obtain an object of type Gateway representing a Secure Gateway, use the Get-RASGateway cmdlet.
<CommonParameters>
-none-
---------- EXAMPLE 1 ---------- Remove-RASGateway "server.company.dom" Removes the specified RAS Secure Gateway server from the Licensing Server site (default). To remove the server from a specific site, specify the -SiteId parameter. The RAS Secure Gateway software will be uninstalled from the server by default. The uninstaller will be remotely executed using your RAS admin credentials (default). ---------- EXAMPLE 2 ---------- Remove-RASGateway -Server "server.company.dom" -SiteId 3 -Username "myname" -Password $pass Removes the specified RAS Secure Gateway server from the specified site. The RAS Secure Gateway software will be remotely uninstalled from the server using the specified credentials. ---------- EXAMPLE 3 ---------- Remove-RASGateway -Id "6" -NoUninstall Removes a RAS Secure Gateway specified by ID. To obtain the ID of a RAS Secure Gateway, use the Get-RASGateway cmdlet. The RAS Secure Gateway software will not be uninstalled from the server. ---------- EXAMPLE 4 ---------- Remove-RASGateway -InputObject $Gateway Removes a RAS Secure Gateway. The $Gateway variable must contain the gateway object to be removed. To obtain a Gateway object representing a Gateway, use the Get-RASGateway cmdlet ---------- EXAMPLE 5 ---------- Get-RASGateway -Id 11 | Remove-RASGateway Removes the RAS Secure Gateway, which is identified by an object obtained from the pipeline output.