# PA Promote Example

## Parallels RAS PowerShell - Connection Broker Promote Example

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

\###### FARM CONFIGURATION ######

\#Activate Parallels RAS with a valid key (you will have to provide a valid Parallels My Account password).\
[Invoke-RASLicenseActivate](https://docs.parallels.com/landing/ras-powershell-api-guide/parallels-ras-powershell-admin-module/index#Invoke-RASLicenseActivate) -Email "<myaccount@email.com>" -Key "YOUR-LICENSE-KEY"

\#Add the backup Connection Broker server.\
[New-RASBroker](https://docs.parallels.com/landing/ras-powershell-api-guide/parallels-ras-powershell-admin-module/index#New-RASBroker) -Server broker.company.dom

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

\#Get the list of connection Brokers.\
[Get-RASBroker](https://docs.parallels.com/landing/ras-powershell-api-guide/parallels-ras-powershell-admin-module/index#Get-RASBroker)

```
ID      Site ID         Server               Enabled          Standby           Priority
--      ------          ------               ----------       ------------      --------------           
1            1          primary.company.dom  True             False             0
2            1          broker.company.dom       True             False             1
                    
```

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

\###### END FARM CONFIGURATION ######

\###### TESTING CONNECTION BROKER PROMOTION ######

\#Establish a connection with Parallels RAS (Replace Administrator with your RAS root account).\
[New-RASSession](https://docs.parallels.com/landing/ras-powershell-api-guide/parallels-ras-powershell-admin-module/index#New-RASSession) Administrator -Server "broker.company.dom" -Force

\#Get the backup Broker server. $BackupBroker = [Get-RASBroker](https://docs.parallels.com/landing/ras-powershell-api-guide/parallels-ras-powershell-admin-module/index#Get-RASBroker) -Server broker.company.dom

\#Promote backup Broker to primary (you will have to provide a valid Parallels My Account password).\
[Invoke-RASBrokerPromoteToPrimary](https://docs.parallels.com/landing/ras-powershell-api-guide/parallels-ras-powershell-admin-module/index#Invoke-RASBrokerPromoteToPrimary) -Id $BackupBroker.Id -Email "<myaccount@email.com>"

\#After the Broker promotion to Primary the session is logged out, then a new session needs to be created. Establish a connection with Parallels RAS (Replace Administrator with your RAS root account).\
[New-RASSession](https://docs.parallels.com/landing/ras-powershell-api-guide/parallels-ras-powershell-admin-module/index#New-RASSession) Administrator -Server "broker.company.dom" -Force

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

\#Get the list of Connection Brokers.\
[Get-RASBroker](https://docs.parallels.com/landing/ras-powershell-api-guide/parallels-ras-powershell-admin-module/index#Get-RASBroker)

```
ID      Site ID         Server               Enabled          Standby           Priority
--      ------          ------               ----------       ------------      --------------           
1            1          primary.company.dom  True             False             1
2            1          broker.company.dom   True             False             0
                    
```

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

\###### END TESTING CONNECTION BROKER PROMOTION ######

© 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.
