Parallels RAS PowerShell - PA Promote Example

#Establish a connection with Parallels RAS (Replace Administrator with your RAS root account). New-RASSession Administrator
###### FARM CONFIGURATION ######
#Activate Parallels RAS with a valid key (you will have to provide a valid Parallels My Account password). Invoke-LicenseActivate -Email "[email protected]" -Key "YOUR-LICENSE-KEY"
#Add the backup PA server. New-PA -Server pa.company.dom
#Apply all settings. This cmdlet performs the same action as the Apply button in the RAS console. Invoke-Apply
#Get the list of PA servers. Get-PA
					
ID      Site ID         Server               Enabled          Standby           Priority
--      ------          ------               ----------       ------------      --------------           
1            1          master.company.dom   True             False             0
2            1          pa.company.dom       True             False             1
#End the current RAS session. Remove-RASSession
###### END FARM CONFIGURATION ######
###### TESTING PA PROMOTION ######
#Establish a connection with Parallels RAS (Replace Administrator with your RAS root account). New-RASSession Administrator -Server "pa.company.dom" -Force
#Get the backup PA server. $BackupPA = Get-PA -Server pa.company.dom
#Promote backup PA to master (you will have to provide a valid Parallels My Account password). Invoke-PAPromoteToMaster -Id $BackupPA.Id -Email "[email protected]"
#Apply all settings. This cmdlet performs the same action as the Apply button in the RAS console. Invoke-Apply
#Get the list of PA servers. Get-PA
					
ID      Site ID         Server               Enabled          Standby           Priority
--      ------          ------               ----------       ------------      --------------           
1            1          master.company.dom   True             False             1
2            1          pa.company.dom       True             False             0
#End the current RAS session. Remove-RASSession
###### END TESTING PA PROMOTION ######