# New-RASSession

### NAME

New-RASSession\ <br>

### SYNOPSIS

Creates a connection with a Parallels RAS farm.\ <br>

### SYNTAX

New-RASSession \[-[Username](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/New-RASSession.html#Username)] *\<string>* \[-[Password](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/New-RASSession.html#Password)] *\<SecureString>* \[\[-[Server](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/New-RASSession.html#Server)] *\<string>*] \[-[Force](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/New-RASSession.html#Force) *\<SwitchParameter>*] \[-[Retries](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/New-RASSession.html#Retries) *\<uint>*] \[*<*[*CommonParameters*](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/New-RASSession.html#CommonParameters)*>*]\
\
New-RASSession \[*<*[*CommonParameters*](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/New-RASSession.html#CommonParameters)*>*]\ <br>

### DESCRIPTION

Connects to a Parallels RAS farm and creates a new RAS session.\
\
A connection with Parallels RAS must be established before you can execute any other commands.\ <br>

### PARAMETERS

\
-**Server \<string>**\
FQDN or IP address of the server where your have Parallels RAS installed.\ <br>

```
        Required?                    false
```

```
        Position?                    2
```

```
        Default value                
```

```
        Accept pipeline input?       false
```

```
        Accept wildcard characters?  false
```

\
-**Username \<string>**\
Parallels RAS administrator username.\ <br>

```
        Required?                    true
```

```
        Position?                    0
```

```
        Default value                
```

```
        Accept pipeline input?       false
```

```
        Accept wildcard characters?  false
```

\
-**Password \<SecureString>**\
Parallels RAS administrator password.\ <br>

```
        Required?                    true
```

```
        Position?                    1
```

```
        Default value                
```

```
        Accept pipeline input?       false
```

```
        Accept wildcard characters?  false
```

\
-**Retries \<uint>**\
Number of reconnections to do if the first one fails. Default is 0.\ <br>

```
        Required?                    false
```

```
        Position?                    named
```

```
        Default value                0
```

```
        Accept pipeline input?       false
```

```
        Accept wildcard characters?  false
```

\
-**Force \<SwitchParameter>**\
Force connection with specified server (or with local host if server not specified).\ <br>

```
        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, WarningAction, WarningVariable,
```

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

```
        about_CommonParameters . 
```

<br>

### INPUTS

-none-

### OUTPUTS

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

### EXAMPLES

\
\&#xNAN;**---------- EXAMPLE 1 ----------**\
\
New-RASSession "username"\
\
Creates a new RAS session with the Parallels RAS farm deployed on the local server.\
\
When you execute the command, you will get a prompt to enter a password.\
\&#xNAN;**---------- EXAMPLE 2 ----------**\
\
New-RASSession -Username "<administrator@domain.dom>" -Password $SecretPassword -Server "192.168.10.200"\
\
Connects to the specified server using specified credentials and creates a new RAS session.\
\
The -Username value must be specified using the UPN format.\
\
The $SecretPassword variable must contain a valid password as SecureString.\
\&#xNAN;**---------- EXAMPLE 3 ----------**\
\
New-RASSession -Username "<administrator@domain.dom>" -Password $SecretPassword -Server "192.168.10.200" -Retries 3\
\
Connects to the specified server using specified credentials and creates a new RAS session.\
\
The -Retries value specifies how many retries to do, in case connection is not established the first time.\
\
The -Username value must be specified using the UPN format.\
\
The $SecretPassword variable must contain a valid password as SecureString.


---

# 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-rassession.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.
