VDI Example
#Establish a connection with Parallels RAS (NB. User will be prompted for Username and Password).
###### FARM CONFIGURATION ######
#Add a Provider.
$Provider = New-RASProvider -Server "vdi.company.dom" -VMwareESXi -VMwareESXiVersion v6_5 -VDIAgent "vdiagent.company.dom" -ProviderUsername root -ProviderPassword $AdminPassword -Name "vdi"
#Apply settings, for the Publishing Agent to connect with the new Provider.
#Get the list of Virtual Machines through the RAS Provider Agent
Get-RASVM -ProviderId $Provider.Id
Name State ID Host ID Site ID
---- ----- -- ------- -------
Windows 8 On 564d5e6f-3fad-bcf9-7c6b-bac9f212713d 1 1#Create a new VDI Template (Guest Automatically Installed)
$vmTemplate = New-RASTemplate -ProviderId $Provider.Id -VMId "564d5e6f-3fad-bcf9-7c6b-bac9f212713d" -Name "Win10template" -ImagePrepTool RASPrep -OwnerName "Owner" -Organization "Parallels" -Domain "company.dom" -CloneMethod LinkedClone -DomainPassword $AdminPassword -Administrator $AdminUsername -AdminPassword $AdminPassword -ObjType VDITemplate -DomainOrgUnit "OU=VDI,DC=dom,DC=company"
#Add a new VDI Host Pool
$VDIHostPool = New-RASVDIHostPool -Name "VDIPool" -MaxHosts 5 -PreCreatedHosts 2 -HostName "Win10-%ID:3%" -ProvisioningType Template -TemplateId $vmTemplate.Id
###### PUBLISHING CONFIGURATION ######
#Add published desktop making use of the VDI Template.
New-RASPubVDIDesktop -Name "VDIDesktop" -ConnectTo AnyGuest -VDITemplateId $vmTemplate.Id -VDIHostPoolId $VDIHostPool.Id -Persistent $true
#Apply all settings. This cmdlet performs the same action as the Apply button in the RAS console.
#End the current RAS session.
© 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.
Last updated