# Remove-RASGateway

### NAME

Remove-RASGateway\ <br>

### SYNOPSIS

Removes a RAS Secure Gateway server from a site.\ <br>

### SYNTAX

Remove-RASGateway \[-[Id](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Remove-RASGateway.html#Id)] *\<uint>* \[-[NoUninstall](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Remove-RASGateway.html#NoUninstall) *\<SwitchParameter>*] \[*<*[*CommonParameters*](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Remove-RASGateway.html#CommonParameters)*>*]\
\
Remove-RASGateway \[-[Id](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Remove-RASGateway.html#Id)] *\<uint>* -[Password](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Remove-RASGateway.html#Password) *\<SecureString>* -[Username](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Remove-RASGateway.html#Username) *\<string>* \[*<*[*CommonParameters*](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Remove-RASGateway.html#CommonParameters)*>*]\
\
Remove-RASGateway \[-[InputObject](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Remove-RASGateway.html#InputObject)] *<*[*Gateway*](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/types/Gateway.html)*>* \[-[NoUninstall](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Remove-RASGateway.html#NoUninstall) *\<SwitchParameter>*] \[*<*[*CommonParameters*](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Remove-RASGateway.html#CommonParameters)*>*]\
\
Remove-RASGateway \[-[InputObject](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Remove-RASGateway.html#InputObject)] *<*[*Gateway*](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/types/Gateway.html)*>* -[Password](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Remove-RASGateway.html#Password) *\<SecureString>* -[Username](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Remove-RASGateway.html#Username) *\<string>* \[*<*[*CommonParameters*](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Remove-RASGateway.html#CommonParameters)*>*]\
\
Remove-RASGateway \[-[Server](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Remove-RASGateway.html#Server)] *\<string>* \[\[-[SiteId](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Remove-RASGateway.html#SiteId)] *\<uint>*] \[-[NoUninstall](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Remove-RASGateway.html#NoUninstall) *\<SwitchParameter>*] \[*<*[*CommonParameters*](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Remove-RASGateway.html#CommonParameters)*>*]\
\
Remove-RASGateway \[-[Server](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Remove-RASGateway.html#Server)] *\<string>* \[\[-[SiteId](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Remove-RASGateway.html#SiteId)] *\<uint>*] -[Password](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Remove-RASGateway.html#Password) *\<SecureString>* -[Username](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Remove-RASGateway.html#Username) *\<string>* \[*<*[*CommonParameters*](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Remove-RASGateway.html#CommonParameters)*>*]\ <br>

### DESCRIPTION

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.\ <br>

### PARAMETERS

\
-**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.\ <br>

```
        Required?                    true
```

```
        Position?                    0
```

```
        Default value                
```

```
        Accept pipeline input?       false
```

```
        Accept wildcard characters?  false
```

\
-**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.\ <br>

```
        Required?                    false
```

```
        Position?                    1
```

```
        Default value                0
```

```
        Accept pipeline input?       false
```

```
        Accept wildcard characters?  false
```

\
-**Id \<uint>**\
The ID of the Secure Gateway to remove.\
\
To obtain the ID of a Secure Gateway, use the Get-RASGateway cmdlet.\ <br>

```
        Required?                    true
```

```
        Position?                    0
```

```
        Default value                0
```

```
        Accept pipeline input?       false
```

```
        Accept wildcard characters?  false
```

\
-**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.\ <br>

```
        Required?                    false
```

```
        Position?                    named
```

```
        Default value                False
```

```
        Accept pipeline input?       false
```

```
        Accept wildcard characters?  false
```

\
-**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.\ <br>

```
        Required?                    true
```

```
        Position?                    named
```

```
        Default value                
```

```
        Accept pipeline input?       false
```

```
        Accept wildcard characters?  false
```

\
-**Password \<SecureString>**\
The password of the account specified in the Username parameter.\ <br>

```
        Required?                    true
```

```
        Position?                    named
```

```
        Default value                
```

```
        Accept pipeline input?       false
```

```
        Accept wildcard characters?  false
```

\
-**InputObject <**[**Gateway**](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/types/Gateway.html)**>**\
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.\ <br>

```
        Required?                    true
```

```
        Position?                    0
```

```
        Default value                
```

```
        Accept pipeline input?       true (ByValue)
```

```
        Accept wildcard characters?  false
```

\
\<CommonParameters>

```
        This cmdlet supports the common parameters: Verbose, Debug,
```

```
        ErrorAction, ErrorVariable, WarningAction, WarningVariable,
```

```
        OutBuffer, PipelineVariable, and OutVariable. For more information, see 
```

```
        about_CommonParameters . 
```

<br>

### INPUTS

[Gateway](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/types/Gateway.html)

### OUTPUTS

-none-

### EXAMPLES

\
\&#xNAN;**---------- 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).\
\&#xNAN;**---------- 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.\
\&#xNAN;**---------- 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.\
\&#xNAN;**---------- 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\
\&#xNAN;**---------- EXAMPLE 5 ----------**\
\
Get-RASGateway -Id 11 | Remove-RASGateway\
\
Removes the RAS Secure Gateway, which is identified by an object obtained from the pipeline output.
