> For the complete documentation index, see [llms.txt](https://docs.parallels.com/landing/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.parallels.com/landing/ras-powershell-api-guide/examples/rasagent.md).

# Agent Example

## Parallels RAS PowerShell - RAS Agent Example

\#Establish a connection with Parallels RAS (Replace Administrator with your RAS root account). [New-RASSession](/landing/ras-powershell-api-guide/parallels-ras-powershell-admin-module/index.md#New-RASSession) Administrator

\#Adding two RAS RDSs [New-RASRDS](/landing/ras-powershell-api-guide/parallels-ras-powershell-admin-module/index.md#New-RASRDS) -Server "rds1.company.dom" -Username administrator\
[New-RASRDS](/landing/ras-powershell-api-guide/parallels-ras-powershell-admin-module/index.md#New-RASRDS) -Server "rds2.company.dom" -Username administrator

\#Apply all settings. This cmdlet performs the same action as the Apply button in the RAS console. [Invoke-RASApply](/landing/ras-powershell-api-guide/parallels-ras-powershell-admin-module/index.md#Invoke-RASApply)

\# Get all available RAS Agents information [Get-RASAgent](/landing/ras-powershell-api-guide/parallels-ras-powershell-admin-module/index.md#Get-RASAgent)

```
ID      Site ID         Server              Type             State            Agent Version         Server OS              
--      ------          ------              ----------       ----------       --------              --------              
1            1          broker.company.dom      BROKER               OK       16.1 (build 1...      Microsoft Win...      
1            1          rds1.company.dom           RDS               OK       16.1 (build 1...      Microsoft Win...      
1            1          gw.company.dom         Gateway      NotVerified                                                   
2            1          rds2.company.dom           RDS               OK       16.1 (build 1...      Microsoft Win...  
                    
```

\# Get the RAS Agent information (by server name 'rds1.company.dom') [Get-RASAgent](/landing/ras-powershell-api-guide/parallels-ras-powershell-admin-module/index.md#Get-RASAgent) -Server rds1.company.dom | Format-Table

```
ID      Site ID         Server              Type            State              Agent Version        Server OS
--      ------          ------              ----------      ----------         --------             --------
1            1          rds1.company.dom           RDS              OK         16.1 (build 1...     Microsoft Win...  
                    
```

\#Update RDS RAS Agent (by input object) $rdsAgent = [Get-RASAgent](/landing/ras-powershell-api-guide/parallels-ras-powershell-admin-module/index.md#Get-RASAgent) -Server rds1.company.dom\
[Update-RASAgent](/landing/ras-powershell-api-guide/parallels-ras-powershell-admin-module/index.md#Update-RASAgent) -InputObject $rdsAgent -Username administrator

\#Update RDS RAS Agent (by server name 'rds2.company.dom') [Update-RASAgent](/landing/ras-powershell-api-guide/parallels-ras-powershell-admin-module/index.md#Update-RASAgent) -Server rds2.company.dom -Username administrator

\# Get all RAS Agents information of type RDS [Get-RASAgent](/landing/ras-powershell-api-guide/parallels-ras-powershell-admin-module/index.md#Get-RASAgent) -ServerType RDS | Format-Table

```
ID      Site ID         Server                Type            State             Agent Version       Server OS                      
--      ------          ------                ----------      ----------        --------            --------                      
1            1          rds1.company.dom             RDS              OK        16.1 (build 1...    Microsoft Win...              
2            1          rds2.company.dom             RDS              OK        16.1 (build 1...    Microsoft Win...              
                    
```

\# Removing RAS Agent (by server name 'rds2.company.dom') [Remove-RASAgent](/landing/ras-powershell-api-guide/parallels-ras-powershell-admin-module/index.md#Remove-RASAgent) -Server rds2.company.dom -Username administrator

\#Apply all settings. This cmdlet performs the same action as the Apply button in the RAS console. [Invoke-RASApply](/landing/ras-powershell-api-guide/parallels-ras-powershell-admin-module/index.md#Invoke-RASApply)

\# Get all available RAS Agents information [Get-RASAgent](/landing/ras-powershell-api-guide/parallels-ras-powershell-admin-module/index.md#Get-RASAgent)

```
ID      Site ID         Server               Type             State            Agent Version            Server OS              
--      ------          ------               ----------       ----------       --------                 --------              
1            1          broker.company.dom       BROKER       OK               16.1 (build 1...         Microsoft Win...      
1            1          rds1.company.dom         RDS          OK               16.1 (build 1...         Microsoft Win...      
1            1          gw.company.dom           Gateway      NotVerified                                                     
                    
```

\#End the current RAS session. [Remove-RASSession](/landing/ras-powershell-api-guide/parallels-ras-powershell-admin-module/index.md#Remove-RASSession)

© 2026 Parallels International GmbH. Parallels and the Parallels logo are trademarks or registered trademarks of Parallels International GmbH in Canada, the U.S., and/or elsewhere.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.parallels.com/landing/ras-powershell-api-guide/examples/rasagent.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
