# Get-RASRDSession

### NAME

Get-RASRDSession\ <br>

### SYNOPSIS

Retrieves information about one or multiple RD Sessions.\ <br>

### SYNTAX

Get-RASRDSession -[ServerId](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Get-RASRDSession.html#ServerId) *\<uint>* -[Source](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Get-RASRDSession.html#Source) {RDS | VDI | AVD | All} \[-[GroupId](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Get-RASRDSession.html#GroupId) *\<uint>*] \[-[IP](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Get-RASRDSession.html#IP) *\<string>*] \[-[SiteId](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Get-RASRDSession.html#SiteId) *\<uint>*] \[-[State](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Get-RASRDSession.html#State) {Active | Connected | ConnectQuery | Shadow | Disconnected | Idle | Listen | Reset | Down | Init | All}] \[-[ThemeId](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Get-RASRDSession.html#ThemeId) *\<uint>*] \[-[User](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Get-RASRDSession.html#User) *\<string>*] \[*<*[*CommonParameters*](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Get-RASRDSession.html#CommonParameters)*>*]\
\
Get-RASRDSession -[Server](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Get-RASRDSession.html#Server) *\<string>* -[Source](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Get-RASRDSession.html#Source) {RDS | VDI | AVD | All} \[-[GroupId](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Get-RASRDSession.html#GroupId) *\<uint>*] \[-[IP](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Get-RASRDSession.html#IP) *\<string>*] \[-[SiteId](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Get-RASRDSession.html#SiteId) *\<uint>*] \[-[State](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Get-RASRDSession.html#State) {Active | Connected | ConnectQuery | Shadow | Disconnected | Idle | Listen | Reset | Down | Init | All}] \[-[ThemeId](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Get-RASRDSession.html#ThemeId) *\<uint>*] \[-[User](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Get-RASRDSession.html#User) *\<string>*] \[*<*[*CommonParameters*](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Get-RASRDSession.html#CommonParameters)*>*]\
\
Get-RASRDSession \[-[GroupId](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Get-RASRDSession.html#GroupId) *\<uint>*] \[-[IP](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Get-RASRDSession.html#IP) *\<string>*] \[-[SiteId](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Get-RASRDSession.html#SiteId) *\<uint>*] \[-[Source](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Get-RASRDSession.html#Source) {RDS | VDI | AVD | All}] \[-[State](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Get-RASRDSession.html#State) {Active | Connected | ConnectQuery | Shadow | Disconnected | Idle | Listen | Reset | Down | Init | All}] \[-[ThemeId](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Get-RASRDSession.html#ThemeId) *\<uint>*] \[-[User](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Get-RASRDSession.html#User) *\<string>*] \[*<*[*CommonParameters*](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/cmdlets/Get-RASRDSession.html#CommonParameters)*>*]\ <br>

### DESCRIPTION

Retrieves the information about one or multiple RD Sessions, from different sources such as RDS and VDI.\ <br>

### PARAMETERS

\
-**SiteId \<uint>**\
Site ID from which to retrieve the Remote Desktop Session information (optional).\ <br>

```
        Required?                    false
```

```
        Position?                    named
```

```
        Default value                0
```

```
        Accept pipeline input?       false
```

```
        Accept wildcard characters?  false
```

\
-**Source <**[**RDSessionSource**](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/types/RDSessionSource.html)**>**\
Source from which to retrieve the Remote Desktop Session information.\
\
Possible values: RDS, VDI, AVD, All\ <br>

```
        Required?                    true
```

```
        Position?                    named
```

```
        Default value                All
```

```
        Accept pipeline input?       false
```

```
        Accept wildcard characters?  false
```

\
-**ServerId \<uint>**\
The Host ID of the server for which to retrieve the information (optional).\ <br>

```
        Required?                    true
```

```
        Position?                    named
```

```
        Default value                4294967295
```

```
        Accept pipeline input?       false
```

```
        Accept wildcard characters?  false
```

\
-**Server \<string>**\
The name of the server to filter the Remote Desktop Session information (optional).\ <br>

```
        Required?                    true
```

```
        Position?                    named
```

```
        Default value                
```

```
        Accept pipeline input?       false
```

```
        Accept wildcard characters?  false
```

\
-**State <**[**SessionState**](https://download.parallels.com/ras/v19/docs/en_US/Parallels-RAS-v19-PowerShell-Guide/RASAdmin/types/SessionState.html)**>**\
State to filter the Remote Desktop Session information (optional).\
\
Possible values: Active, Connected, ConnectQuery, Shadow, Disconnected, Idle, Listen, Reset, Down, Init, All\ <br>

```
        Required?                    false
```

```
        Position?                    named
```

```
        Default value                All
```

```
        Accept pipeline input?       false
```

```
        Accept wildcard characters?  false
```

\
-**User \<string>**\
User to filter the Remote Desktop Session information (optional).\ <br>

```
        Required?                    false
```

```
        Position?                    named
```

```
        Default value                
```

```
        Accept pipeline input?       false
```

```
        Accept wildcard characters?  false
```

\
-**IP \<string>**\
IP Address to filter the Remote Desktop Session information (optional).\ <br>

```
        Required?                    false
```

```
        Position?                    named
```

```
        Default value                
```

```
        Accept pipeline input?       false
```

```
        Accept wildcard characters?  false
```

\
-**ThemeId \<uint>**\
The Theme ID for which to retrieve the information (optional).\ <br>

```
        Required?                    false
```

```
        Position?                    named
```

```
        Default value                4294967295
```

```
        Accept pipeline input?       false
```

```
        Accept wildcard characters?  false
```

\
-**GroupId \<uint>**\
The RDS Group ID for which to retrieve the information (optional).\ <br>

```
        Required?                    false
```

```
        Position?                    named
```

```
        Default value                4294967295
```

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

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

### EXAMPLES

\
\&#xNAN;**---------- EXAMPLE 1 ----------**\
\
Get-RASRDSession\
\
Retrieves a list of RD Sessions.\
\&#xNAN;**---------- EXAMPLE 2 ----------**\
\
Get-RASRDSession -Source RDS\
\
Retrieves a list of RDS Sessions.\
\&#xNAN;**---------- EXAMPLE 3 ----------**\
\
Get-RASRDSession -Source RDS -Server "MyServer"\
\
Retrieves a list of RDS Sessions pertaining to the specified server.\
\&#xNAN;**---------- EXAMPLE 4 ----------**\
\
Get-RASRDSession -Source VDI -SiteId 1\
\
Retrieves a list of VDI Sessions for SiteId 1.\
\&#xNAN;**---------- EXAMPLE 5 ----------**\
\
Get-RASRDSession -Source VDI -ServerId 1\
\
Retrieves the VDI Session for ServerId 1.\
\&#xNAN;**---------- EXAMPLE 6 ----------**\
\
Get-RASRDSession -User "Administrator" -IP "1.1.1.1" -State Idle\
\
Retrieves the Sessions with specified Username, IP and State.


---

# 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/get-rasrdsession.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.
