Publishing Example
Last updated
Last updated
#Establish a connection with Parallels RAS (Replace Administrator with your RAS root account). Administrator
###### FARM CONFIGURATION ######
#Add two RD Session Host servers. $RDS1 = -Server "rds1.company.dom" $RDS2 = -Server "rds2.company.dom"
#Get the list of RD Session Host servers. $RDSList =
#Create a RAS RD Session Host group and add both RDS objects to it. $RDSGrp = -Name "My RDS Group" -RDSObject $RDSList
#Update default settings used to configure RD Session Host agents. -MaxSessions 100 -EnableAppMonitoring $true
###### PUBLISHING CONFIGURATION ######
#Add published folders to be used by different departments. $Fld_Acc = -Name "AccDept" -Description "Accounting" $Fld_Sales = -Name "SalesDept" -Description "Sales"
#Add published desktops within their respective folders. $Desk_Acc = -Name "AccPubDesktop" -ParentFolder $Fld_Acc -DesktopSize FullScreen -PublishFrom Group -PublishFromGroup $RDSGrp $Desk_Sales = -Name "SalesPubDesktop" -ParentFolder $Fld_Sales -DesktopSize Custom -Width 600 -Height 400 -PublishFrom All
#Add published applications within their respective folders. $App_Acc = -Name "AccPubApp" -Target "C:\Windows\System32\calc.exe" -ParentFolder $Fld_Acc -PublishFrom All -WinType Maximized -StartOnLogon $App_Sales = -Name "SalesPubApp" -Target "C:\Windows\System32\notepad.exe" -ParentFolder $Fld_Sales -PublishFrom Server -PublishFromServer $RDS1
#Update default settings used to configure published resources. -CreateShortcutOnDesktop $true
#Override shortcut default settings for a specific published application. -InputObject $App_Sales -InheritShorcutDefaultSettings $false -CreateShortcutOnDesktop $false
###### PUB FILTERING CONFIGURATION ######
#Set AD account filters by ID. -Id $Desk_Acc.Id -ObjType PubItem -RuleName "Rule 1" $Desk_Acc_Rules = -Id $Desk_Acc.Id -ObjType PubItem -Id $Desk_Acc.Id -ObjType PubItem -SecurityPrincipalsEnabled $true -RuleId $Desk_Acc_Rules[0].Id -Id $Desk_Acc.Id -ObjType PubItem -RuleId $Desk_Acc_Rules[0].Id -Account "Guests"
#Set AD account filters by object. -Id $Desk_Acc.Id -ObjType PubItem -RuleId $Desk_Acc_Rules[0].Id -SID "S-1-5-11"
© 2025 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.
#Set an IP filter (with range) on application. -InputObject $App_Acc -RuleName "Rule 1" $App_Acc_Rules = -Id $App_Acc.Id -ObjType PubItem -InputObject $App_Acc -RuleId $App_Acc_Rules[0].Id -IPsEnabled $true -InputObject $App_Acc -RuleId $App_Acc_Rules[0].Id -IPType Version4 -IP "10.0.0.1-10.0.0.12"
#Apply all settings. This cmdlet performs the same action as the Apply button in the RAS console.
#End the current RAS session.