# New-RASGateway

### NAME

New-RASGateway\ <br>

### SYNOPSIS

Adds a RAS Secure Gateway server to a site.\ <br>

### SYNTAX

New-RASGateway \[-[Server](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/New-RASGateway.html#Server)] *\<string>* \[\[-[SiteId](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/New-RASGateway.html#SiteId)] *\<uint>*] \[-[EnableUserPortal](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/New-RASGateway.html#EnableUserPortal) *\<bool>*] \[-[NoFireWallRules](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/New-RASGateway.html#NoFireWallRules) *\<SwitchParameter>*] \[-[NoInstall](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/New-RASGateway.html#NoInstall) *\<SwitchParameter>*] \[-[NoRestart](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/New-RASGateway.html#NoRestart) *\<SwitchParameter>*] \[*<*[*CommonParameters*](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/New-RASGateway.html#CommonParameters)*>*]\
\
New-RASGateway \[-[Server](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/New-RASGateway.html#Server)] *\<string>* \[\[-[SiteId](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/New-RASGateway.html#SiteId)] *\<uint>*] -[Password](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/New-RASGateway.html#Password) *\<SecureString>* -[Username](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/New-RASGateway.html#Username) *\<string>* \[-[EnableUserPortal](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/New-RASGateway.html#EnableUserPortal) *\<bool>*] \[-[NoFireWallRules](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/New-RASGateway.html#NoFireWallRules) *\<SwitchParameter>*] \[-[NoRestart](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/New-RASGateway.html#NoRestart) *\<SwitchParameter>*] \[*<*[*CommonParameters*](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/New-RASGateway.html#CommonParameters)*>*]\ <br>

### DESCRIPTION

Adds a RAS Secure Gateway server to a site.\
\
By default, the cmdlet will install the necessary RAS Secure Gateway software on the server.\
\
If the software is already installed, you can skip the installation by including the -NoInstall parameter.\ <br>

### PARAMETERS

\
-**Server \<string>**\
FQDN or IP address of the server to be added to a site as a RAS Secure Gateway.\ <br>

```
        Required?                    true
```

```
        Position?                    0
```

```
        Default value                
```

```
        Accept pipeline input?       false
```

```
        Accept wildcard characters?  false
```

\
-**SiteId \<uint>**\
The site ID to which the Secure Gateway should be added.\
\
To obtain the ID of a desired site, use the appropriate command to Get Sites.\
\
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
```

\
-**Username \<string>**\
An administrator account to push install the Secure Gateway software on the target 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
```

\
-**NoInstall \<SwitchParameter>**\
If this parameter is included, the Secure Gateway software will not be installed on the target server.\
\
The parameter should only be included if the server already has the software installed.\
\
If you need to install the software, omit this parameter.\
\
When installing the Gateway software, your RAS admin credentials will be used to push install the software. These are the credentials you used to connect to the RAS farm.\
\
If needed, you can specify different credentials using the Username and Password parameters.\ <br>

```
        Required?                    false
```

```
        Position?                    named
```

```
        Default value                False
```

```
        Accept pipeline input?       false
```

```
        Accept wildcard characters?  false
```

\
-**NoRestart \<SwitchParameter>**\
Specifies not to restart the server after the RAS Secure Gateway is installed.\
\
If this parameter is omitted, the server will be restarted if required.\ <br>

```
        Required?                    false
```

```
        Position?                    named
```

```
        Default value                False
```

```
        Accept pipeline input?       false
```

```
        Accept wildcard characters?  false
```

\
-**NoFireWallRules \<SwitchParameter>**\
Specifies not to add firewall rules to allow the RDS Agent to communicate.\
\
If this parameter is omitted, the firewall rules will not be added.\ <br>

```
        Required?                    false
```

```
        Position?                    named
```

```
        Default value                False
```

```
        Accept pipeline input?       false
```

```
        Accept wildcard characters?  false
```

\
-**EnableUserPortal \<bool>**\
Enable or disable User Portal connectivity on the Secure Gateway.\ <br>

```
        Required?                    false
```

```
        Position?                    named
```

```
        Default value                
```

```
        Accept pipeline input?       false
```

```
        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

-none-

### OUTPUTS

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

### EXAMPLES

\
\&#xNAN;**---------- EXAMPLE 1 ----------**\
\
New-RASGateway "server.company.dom"\
\
Adds the specified RAS Secure Gateway server to the Licensing Server site (default).\
\
The Gateway software will be push installed on the server by default using your RAS admin credentials (default).\
\
\&#xNAN;**---------- EXAMPLE 2 ----------**\
\
New-RASGateway -Server "server.company.dom" -Username "myname" -Password $pass\
\
Adds the specified RAS Secure Gateway server to the Licensing Server site (default).\
\
The Gateway software will be installed on the server by default.\
\
-Username and -Password parameters specify credentials to log in to the server to push install the Gateway software.\
\
You only need to specify credentials if you cannot log in to the target server using your RAS admin credentials (see example above).\
\&#xNAN;**---------- EXAMPLE 3 ----------**\
\
New-RASGateway -Server "server.company.dom" -SiteId 2 -NoInstall\
\
Adds a RAS Secure Gateway server specified by FQDN to the specified site.\
\
The -SiteId parameter specifies the site ID. To obtain the ID of a desired site, use the Get-RASSites cmdlet.\
\
The -NoInstall parameter specifies not to install the Gateway software on the server (assuming it's already installed).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.parallels.com/landing/ras-powershell-api-guide/v19/parallels-ras-powershell-admin-module/commands/new-rasgateway.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
