### Start a VM from Pipeline Input Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/start-rasvm This example demonstrates starting a virtual machine by piping a VM object obtained from Get-RASVM to the Start-VM cmdlet. This method is useful when you already have the VM object. ```powershell Get-RASVM -ProviderId 2 -Id 42311235-09c5-ca15-337d-b9723015edf0 | Start-VM ``` -------------------------------- ### New-RASPubAVDDesktop Example Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/new-raspubavddesktop Example of how to add a published AVD desktop using the New-RASPubAVDDesktop cmdlet. ```APIDOC ## EXAMPLES **---------- EXAMPLE 1 ----------** New-RASPubAVDDesktop "My AVD Desktop" Adds a published desktop and gives it the specified name. ``` -------------------------------- ### Set-RASPubVDIDesktop - Examples Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/set-raspubvdidesktop Examples demonstrating how to use the Set-RASPubVDIDesktop cmdlet. ```APIDOC ## Examples **---------- EXAMPLE 1 ----------** ```powershell Set-RASPubVDIDesktop -Id 1 -Enabled $false ``` Disables a published desktop specified by ID. **---------- EXAMPLE 2 ----------** ```powershell Set-RASPubVDIDesktop $PubVDIDesktop -Enabled $false ``` Disables a published desktop specified by the $PubVDIDesktop object. To obtain the object, use the Get-RASPubVDIDesktop cmdlet. **---------- EXAMPLE 3 ----------** ```powershell Get-RASPubVDIDesktop -Id 1 | Set-RASPubVDIDesktop -Enabled $false ``` Disables a published desktop specified by an object obtained from the pipeline output. ``` -------------------------------- ### New-RASPubLocalApp Examples Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/new-raspublocalapp Examples for creating a published application locally using the New-RASPubLocalApp cmdlet. ```APIDOC ## New-RASPubLocalApp Examples ### Example 1: Create a published application locally ```powershell New-RASPubLocalApp -Name "My Local App" ``` ### Example 2: Create a published application locally and enable for Windows ```powershell New-RASPubLocalApp -Name "My Local App" -WindowsEnabled 1 ``` ``` -------------------------------- ### Create Published Application Examples Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/new-raspublocalapp Examples demonstrating how to create a published application using New-RASPubLocalApp. ```powershell New-RASPubLocalApp -Name "My Local App" ``` ```powershell New-RASPubLocalApp -Name "My Local App" -WindowsEnabled 1 ``` -------------------------------- ### Add RD Session Host Examples Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/new-rasrdshost Examples demonstrating how to add an RD Session Host server with various configurations. ```powershell New-RASRDSHost "server.company.dom" ``` ```powershell New-RASRDSHost -Server "server.company.dom" -SiteId 2 -Username "myname" -Password $pass ``` ```powershell New-RASRDSHost "server.company.dom" -NoInstall ``` -------------------------------- ### Publish VDI Application Examples Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/new-raspubvdiapp Examples demonstrating how to add a published application package using the New-RASPubVDIApp cmdlet. ```powershell New-RASPubVDIApp -Name "My VDI App" -Target "%windir%\system32\myapp.exe" ``` ```powershell New-RASPubVDIApp -Name "My VDI App" -Package "AppPackage1" -PackagedApp "TestApp1" ``` -------------------------------- ### Set-RASProvider Usage Examples Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/set-rasprovider Examples demonstrating how to enable, disable, and configure Provider servers using server names, IDs, or objects. ```powershell Set-RASProvider -Server "server.company.dom" -Enabled $False ``` ```powershell Set-RASProvider -Id 3 -Enabled $False ``` ```powershell Set-RASProvider $Provider -Enabled $True ``` ```powershell Set-RASProvider $Provider -VCenter -ResourcePool "ResourcePool" ``` ```powershell Get-RASProvider -Id 3 | Set-RASProvider -Enabled $True ``` -------------------------------- ### Start Path Settings Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/types/pubdefaultsettings Configuration options related to the starting path for applications. ```APIDOC ## GET /settings/startpath ### Description Retrieves the starting path of the settings. ### Method GET ### Endpoint /settings/startpath ### Response #### Success Response (200) - **StartPath** (String) - Starting path of the settings. #### Response Example { "StartPath": "C:\\Program Files\\MyApp" } ``` ```APIDOC ## PUT /settings/startpath ### Description Updates the starting path of the settings. ### Method PUT ### Endpoint /settings/startpath ### Parameters #### Request Body - **StartPath** (String) - Required - Starting path of the settings. ### Request Example { "StartPath": "D:\\NewFolder\\App" } ### Response #### Success Response (200) - **Message** (String) - Indicates the success of the operation. #### Response Example { "Message": "Start path updated successfully." } ``` -------------------------------- ### Set-RASPubAVDDesktop Usage Examples Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/set-raspubavddesktop Examples demonstrating how to disable a published desktop using ID, object, or pipeline input. ```powershell Set-RASPubAVDDesktop -Id 1 -Enabled $false ``` ```powershell Set-RASPubAVDDesktop $PubAVDDesktop -Enabled $false ``` ```powershell Get-RASPubAVDDesktop -Id 1 | Set-RASPubAVDDesktop -Enabled $false ``` -------------------------------- ### Set-RASAllowedDevicesSetting Usage Examples Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/set-rasalloweddevicessetting Examples demonstrating how to prohibit specific client types or configure connection modes. ```powershell Set-RASAllowedDevicesSetting -AllowClientMAC $false ``` ```powershell Set-RASAllowedDevicesSetting -AllowClientMode AllClientsConnectToSystem -AllowClientMACOS $false ``` -------------------------------- ### Start On Logon Setting Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/new-raspubrdsdesktop Enable or disable the 'Start automatically when user logs on' option. ```APIDOC ## StartOnLogon ### Description Enable or disable the 'Start automatically when user logs on' option. ### Method Not specified (likely part of a larger command) ### Endpoint Not specified ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **StartOnLogon** (SwitchParameter) - Required: false - Default value: False. Enables or disables automatic start on user logon. ### Request Example ```json { "StartOnLogon": true } ``` ### Response #### Success Response (200) - No specific response fields mentioned. #### Response Example None provided. ``` -------------------------------- ### Set-RASPubItem Usage Examples Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/set-raspubitem Examples demonstrating how to modify published resources using ID, InputObject, or pipeline input. ```powershell Set-RASPubItem 1 -Enabled $false ``` ```powershell Set-RASPubItem -InputObject $PubItem -Enabled $false ``` ```powershell Get-RASPubItem -Id 1 | Set-RASPubItem -Enabled $false ``` -------------------------------- ### Get-RASVM Output Example Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/examples/vdi Example output returned by the Get-RASVM cmdlet. ```text Name State ID Host ID Site ID ---- ----- -- ------- ------- Windows 8 On 564d5e6f-3fad-bcf9-7c6b-bac9f212713d 1 1 ``` -------------------------------- ### Set-RASPowerPermission Examples Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/set-raspowerpermission Examples demonstrating the usage of the Set-RASPowerPermission cmdlet. ```APIDOC ## EXAMPLES ### Example 1: Modifying AllowSiteChanges ```powershell Set-RASPowerPermission -AdminId 100 -AllowSiteChanges $false ``` Modifies AllowSiteChanged for AdminId 100 to False. ### Example 2: Modifying AllowConnectionChanges ```powershell Set-RASPowerPermission -AdminId 100 -AllowConnectionChanges $false ``` Modifies AllowConnectionChanges for AdminId 100 to False. ``` -------------------------------- ### Start a VM by Provider and ID Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/start-rasvm Use this command to start a specific virtual machine by providing its Provider ID and the VM's unique UUID. Ensure the ProviderId is of type uint and the Id is a string UUID. ```powershell Start-RASVM -ProviderId 2 -Id 42311235-09c5-ca15-337d-b9723015edf0 ``` -------------------------------- ### Start-RASVM Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/index Starts a virtual machine. ```APIDOC ## Start-RASVM ### Description Starts a virtual machine. ### Method PowerShell Cmdlet ``` -------------------------------- ### PartialStartLayoutContent Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/set-rasimageoptimization String specifying partial start layout content. ```APIDOC ## PartialStartLayoutContent (string) ### Properties - **Required?**: false - **Position?**: named - **Default value**: - **Accept pipeline input?**: false - **Accept wildcard characters?**: false ``` -------------------------------- ### Set-RASPubRDSApp Usage Examples Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/set-raspubrdsapp Examples demonstrating how to disable applications by ID or object, and how to modify application package details. ```powershell Set-RASPubRDSApp -Id 1 -Enabled $false ``` ```powershell Set-RASPubRDSApp $PubRDSApp -Enabled $false ``` ```powershell Get-RASPubRDSApp -Id 1 | Set-RASPubRDSApp -Enabled $false ``` ```powershell Set-RASPubRDSApp -Id 1 -Package "AppPackage2" -PackagedApp "TestApp2" ``` -------------------------------- ### Invoke-RASMFA Usage Examples Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/invoke-rasmfa Examples demonstrating how to use the Invoke-RASMFA cmdlet for various operations. ```powershell Invoke-RASMFA -Id 1 -Duplicate ``` ```powershell Invoke-RASMFA -ValidateADAccess -SiteId 1 -ADCustomAttribute "customasd" -UserPrincipalName "" ``` ```powershell Invoke-RASMFA -CheckConnection -Server 1.1.1.1 -BackupServer 2.2.2.2 -Port 80 -HAMode Parallel -Timeout 1 -Retries 1 -SecretKey $secretkey -PasswordEncoding CHAP ``` -------------------------------- ### Set-RASPubVDIDesktop Usage Examples Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/set-raspubvdidesktop Examples demonstrating how to disable a published VDI desktop using ID, object, or pipeline input. ```powershell Set-RASPubVDIDesktop -Id 1 -Enabled $false ``` ```powershell Set-RASPubVDIDesktop $PubVDIDesktop -Enabled $false ``` ```powershell Get-RASPubVDIDesktop -Id 1 | Set-RASPubVDIDesktop -Enabled $false ``` -------------------------------- ### Add-RASCriteriaTheme Usage Examples Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/add-rascriteriatheme Examples demonstrating how to add a theme to criteria settings using either the theme name or the theme ID. ```powershell Add-RASCriteriaTheme -Id 1 -ObjType LogonHours -ThemeName "Theme1" ``` ```powershell Add-RASCriteriaTheme -Name "Logon1" -ObjType LogonHours -ThemeId 1 ``` -------------------------------- ### StartPath Property Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/set-raspubvdidesktop Specifies the path in the Start folder where the shortcut will be created. ```APIDOC ## StartPath Property ### Description Specifies the path in the Start folder where the shortcut will be created. ### Properties - **Required?** (boolean) - false - **Position?** (string) - named - **Default value** (string) - - **Accept pipeline input?** (boolean) - false - **Accept wildcard characters?** (boolean) - false ``` -------------------------------- ### Create New MFA Object Example Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/new-rasmfa Example of creating a new Multi-Factor Authentication object with the name 'MFA'. ```powershell New-RASMFA "MFA" ``` -------------------------------- ### Set-RASPubVDIApp Usage Examples Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/set-raspubvdiapp Examples demonstrating how to disable applications or modify package details using the Set-RASPubVDIApp cmdlet. ```powershell Set-RASPubVDIApp -Id 1 -Enabled $false ``` ```powershell Set-RASPubVDIApp $PubVDIApp -Enabled $false ``` ```powershell Get-RASPubVDIApp -Id 1 | Set-RASPubVDIApp -Enabled $false ``` ```powershell Set-RASPubVDIApp -Id 1 -Package "AppPackage2" -PackagedApp "TestApp2" ``` -------------------------------- ### Add-RASAutoUpgradeMessage Usage Examples Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/add-rasautoupgrademessage Examples demonstrating how to add auto-upgrade messages using default object types, names, or IDs. ```powershell Add-RASAutoUpgradeMessage -DefObjType RDSDef -Enabled 0 -SendMsgSecs 60 -SendMsgWhen Before -MessageTitle "messageTitle" -Message "messageBody" ``` ```powershell Add-RASAutoUpgradeMessage -Name "VDIHostPool1" -ObjType VDIHostPool -Enabled 0 -SendMsgSecs 60 -SendMsgWhen Before -MessageTitle "messageTitle" -Message "messageBody" ``` ```powershell Add-RASAutoUpgradeMessage -Id 1 -ObjType AVDHostPool -Enabled 0 -SendMsgSecs 60 -SendMsgWhen Before -MessageTitle "messageTitle" -Message "messageBody" ``` -------------------------------- ### Add-RASCriteriaIP Usage Examples Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/add-rascriteriaip Examples demonstrating how to add IPv4 addresses and ranges to MFA criteria using either an ID or a Name identifier. ```powershell Add-RASCriteriaIP -Id 1 -ObjType MFA -IP "1.2.3.4" -IPType Version4 ``` ```powershell Add-RASCriteriaIP -Name "Logon1" -ObjType MFA -IP "1.2.3.4-1.2.3.5" -IPType Version4 ``` -------------------------------- ### Get Overwrite Support Actions Settings Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/get-rasoverwritesupportactions Obtains the active Overwrite Support Actions settings for the current site. No specific setup or imports are required beyond having the Parallels RAS PowerShell module installed. ```powershell Get-RASOverwriteSupportActions ``` -------------------------------- ### Get Cmdlet Help Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/index-1 Access documentation for a specific cmdlet. ```powershell Get-Help Get-RASGateway ``` -------------------------------- ### Get RAS Printing Auto Install Font Settings Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/get-rasprintingautoinstallfont Retrieves the Parallels RAS Auto install fonts settings. This cmdlet can optionally filter settings by a specific Site ID. ```APIDOC ## GET /api/v1/printing/auto-install-fonts ### Description Retrieves the Parallels RAS Auto install fonts settings. This endpoint can be used to fetch the global settings or settings for a specific site. ### Method GET ### Endpoint /api/v1/printing/auto-install-fonts ### Parameters #### Query Parameters - **SiteId** (uint) - Optional - The ID of the site for which to retrieve settings. If not provided, global settings are returned. ### Request Example ```json { "example": "GET /api/v1/printing/auto-install-fonts?SiteId=123" } ``` ### Response #### Success Response (200) - **fonts** (Array[String]) - A list of font names that are set to auto-install. #### Response Example ```json { "example": { "fonts": [ "Arial", "Times New Roman" ] } } ``` ``` -------------------------------- ### Get RAS Printing Auto Install Font Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module Retrieves information about RAS printing auto-install fonts. ```APIDOC ## GET /api/ras/printing/autoinstall-font ### Description Retrieves a list of fonts configured for auto-installation in RAS printing. ### Method GET ### Endpoint /api/ras/printing/autoinstall-font ### Response #### Success Response (200) - **Fonts** (array) - A list of font names. #### Response Example ```json { "Fonts": [ "Arial.ttf", "TimesNewRoman.ttf" ] } ``` ``` -------------------------------- ### Get RAS Agent Information for a Specific Server Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/get-rasagent Retrieves information about agents installed on a server named 'MyRASserver'. ```powershell Get-RASAgent -Server MyRASserver ``` -------------------------------- ### Get RAS Version Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module Retrieves the current version of the Parallels RAS installation. Use this command to verify your deployment version. ```powershell Get-RASVersion ``` -------------------------------- ### Create a new client policy Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/new-rasclientpolicy Examples demonstrating how to create a new client policy with basic and advanced configurations. ```powershell New-RASClientPolicy -Name PDFPolicy ``` ```powershell New-RASClientPolicy -Name UserGroupPolicy -Enable $False -Description 'For the User Groups' ``` -------------------------------- ### Get RAS Agent Information for RDS Server Type Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/get-rasagent Retrieves information about agents installed on all RD Sessions Host servers in the farm. ```powershell Get-RASAgent -ServerType RDS ``` -------------------------------- ### StartFullscreen Parameter Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/set-raspubrdsapp Enables or disables the 'Start in fullscreen mode for WYSE ThinOS clients' option. ```APIDOC ## StartFullscreen ### Description Enable or disable the 'Start in fullscreen mode for WYSE ThinOS clients" option. ### Type bool ### Properties - **Required**: false - **Position**: named - **Default value**: - **Accept pipeline input**: false - **Accept wildcard characters**: false ``` -------------------------------- ### Get RAS Agent Information for a Specific Server in a Specific Site Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/get-rasagent Retrieves information about agents installed on the server named 'MyRASserver' from a specific site. ```powershell Get-RASAgent -SiteId 3 -Server MyRASserver ``` -------------------------------- ### Get RAS HALB Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands Retrieves information about the High Availability Load Balancer (HALB) in Parallels RAS. Use this to check the configuration and status of your load balancing setup. ```powershell Get-RASHALB ``` -------------------------------- ### Get RAS Image Optimization Predefined Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands Retrieves predefined image optimization profiles available in Parallels RAS. Use these profiles as a starting point for optimizing your VM images. ```powershell Get-RASImageOptimizationPredefined ``` -------------------------------- ### Create a New HALB Virtual Server Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/new-rashalb Example usage of the New-RASHALB cmdlet to create a virtual server with specified IP settings. ```powershell New-RASHALB -Name "HALB-VirtualServer" -IPVersion Version4 -VirtualIPv4 "1.2.3.4" -SubnetMask "255.255.255.0" -DeviceIPs @("4.3.2.1", "1.2.1.2") -NoInstall ``` -------------------------------- ### Get RAS Agent Information for RDS Server Type in a Specific Site Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/get-rasagent Retrieves information about agents installed on all RD Sessions Host servers in the farm of a specific site. ```powershell Get-RASAgent -SiteId 3 -ServerType RDS ``` -------------------------------- ### Retrieve Invitation Email Settings Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/get-rasinvitationemailsettings Use this cmdlet to retrieve the current configuration settings for Parallels RAS invitation emails. No specific setup is required beyond having the module installed. ```powershell Get-RASInvitationEmailSettings ``` -------------------------------- ### Get RAS MFA Radius Auto Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands Retrieves the automatic RADIUS configuration settings for Multi-Factor Authentication (MFA) in Parallels RAS. This command helps in automating RADIUS setup for MFA. ```powershell Get-RASMFARadiusAuto ``` -------------------------------- ### Get Parallels RAS CPU Optimization Settings Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/get-rascpuoptimizationsettings Obtains the complete set of CPU optimization settings for the current session. No specific setup is required beyond having the Parallels RAS PowerShell module imported. ```powershell Get-RASCPUOptimizationSettings ``` -------------------------------- ### New-RASHALB Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/new-rashalb Creates a new instance of the HALB Virtual server settings and can initialize specified HALB devices. ```APIDOC ## New-RASHALB ### Description Creates a new instance of the HALB Virtual server settings. Can also initialize the HALB Devices that were specified. ### Method PowerShell Cmdlet ### Parameters #### Name (string) The HALB Virtual Server name. - Required: true - Position: 0 #### SiteId (uint) The site ID where the HALB settings will be created. - Required: false - Position: 1 - Default: 0 #### IPVersion (IPVersion) The supported IP versions of the HALB Virtual Server. Possible values: Version4, Version6, BothVersions. - Required: true - Position: 3 - Default: Version4 #### DeviceIPs (List`1) The list of the HALB Device IPs. - Required: false - Position: 8 #### EnableGatewayPayload (SwitchParameter) Enable/Disable the Non-SSL Gateway configuration of the HALB Virtual Server. - Required: false - Position: 9 - Default: False #### EnableSSLPayload (SwitchParameter) Enable/Disable the SSL Gateway configuration of the HALB Virtual Server. - Required: false - Position: 12 - Default: False ``` -------------------------------- ### Add RAS Gateway Server without Installation Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/new-rasgateway Adds a RAS Secure Gateway server to a specified site without installing the Gateway software, assuming it is already installed. ```powershell New-RASGateway -Server "server.company.dom" -SiteId 2 -NoInstall ``` -------------------------------- ### New-RASPubAVDDesktop Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/types/pubitem Creates a new published AVD desktop resource. ```APIDOC ## New-RASPubAVDDesktop ### Description Creates a new published AVD desktop resource in the Parallels RAS environment. ``` -------------------------------- ### Set-RASVDIDefaultSettings Example Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/set-rasvdidefaultsettings Example of modifying the default connection timeout using Set-RASVDIDefaultSettings. ```APIDOC ## EXAMPLES ### Example 1 ```powershell Set-RASVDIDefaultSettings -ConnectionTimeoutSec 300 ``` #### Description Modifies the default connection timeout. ``` -------------------------------- ### Set-RASAVDDefaultSettings Example Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/set-rasavddefaultsettings Example of how to use the Set-RASAVDDefaultSettings cmdlet to modify the DisconnectActiveSessionAfter property. ```APIDOC ## EXAMPLES **---------- EXAMPLE 1 ----------** Set-RASAVDDefaultSettings -SiteId 1 -DefObjType AVDSingleSessionDefaultSettings -DisconnectActiveSessionAfter 10 Modifies the default value of the DisconnectActiveSessionAfter property for the specified site. ``` -------------------------------- ### New-RASHALB Cmdlet Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/new-rashalb Creates a new HALB Virtual Server with specified network and security configurations. ```APIDOC ## New-RASHALB ### Description Creates a new HALB Virtual Server. This cmdlet supports configuring SSL gateway settings, certificate IDs, and device management gateways. ### Parameters #### Optional Parameters - **CipherStrength** (CipherStrength) - Optional - The cipher strength to be used for the SSL Gateways (Low, Medium, High, Custom). - **CipherPreference** (bool) - Optional - Enable or disable 'Use ciphers according to server preference'. - **SSLCustomCipher** (string) - Optional - The SSL custom cipher for SSL Gateways. - **CertificateID** (uint) - Optional - The certificate ID. - **DeviceManagerGateways** (List`1) - Optional - The list of the Device Management Gateways for HALB Virtual Server. ### Request Example New-RASHALB -Name "HALB-VirtualServer" -IPVersion Version4 -VirtualIPv4 "1.2.3.4" -SubnetMask "255.255.255.0" -DeviceIPs @("4.3.2.1", "1.2.1.2") -NoInstall ### Response #### Success Response - **Output** (HALBSettings) - Returns the configuration object of the created HALB Virtual Server. ``` -------------------------------- ### Set-RASAgentLogLevel Examples Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/set-rasagentloglevel Examples demonstrating how to modify the log level for RAS Agents. ```APIDOC ## Set-RASAgentLogLevel ### Description Modifies the log level for RAS Agents. ### Method *Not applicable (PowerShell cmdlet)* ### Endpoint *Not applicable (PowerShell cmdlet)* ### Parameters #### Path Parameters *None* #### Query Parameters *None* #### Request Body *Not applicable (PowerShell cmdlet)* ### Request Example #### Example 1: Set log level for all RDS Agents ```powershell Set-RASAgentLogLevel -ServerType RDS -LogLevel Extended ``` **Description:** Modifies the log level for every RAS RDS Agent to 'Extended'. If -Duration is omitted, a 12-hour duration is set by default. After the duration has passed, the LogLevel is automatically reset to Standard. #### Example 2: Set log level for a specific server with duration ```powershell Set-RASAgentLogLevel -Server MyRASserver -LogLevel Verbose -DurationInSec 43200 ``` **Description:** Modifies the log level for the specified RAS server to 'Verbose' for a duration of 12 hours. #### Example 3: Set log level for a specific RDS server with maximum duration ```powershell Set-RASAgentLogLevel -InputObject $RDSStatus -LogLevel Extended -DurationInSec 259200 ``` **Description:** Modifies the log level for the specified RDS RAS server to 'Extended' for maximum duration (72 hours). ### Response #### Success Response *Not applicable (PowerShell cmdlet output)* #### Response Example *Not applicable (PowerShell cmdlet output)* ``` -------------------------------- ### Set-RASPubDefaultSettings Usage Example Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/set-raspubdefaultsettings Enables the 'Create shortcut on Desktop' option for a specific site. ```powershell Set-RASPubDefaultSettings -SiteId 2 -CreateShortcutOnDesktop $true ``` -------------------------------- ### RAS VDI Agent Installation Parameters Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/new-rasprovider This section outlines the parameters that can be used when installing the RAS VDI Agent via the PowerShell API. These parameters allow for fine-grained control over the installation process. ```APIDOC ## NoInstall (SwitchParameter) ### Description Specifies not to install the RAS VDI Agent on the server. If this parameter is omitted, the agent will be push installed on the server using your RAS admin credentials. To specify different credentials for push installation, specify the Username and Password parameters. ### Parameter Details - **Required?**: false - **Position?**: named - **Default value**: False ## NoRestart (SwitchParameter) ### Description Specifies not to restart the server after the RAS VDI Agent is installed when installing the VDI Agent. If this parameter is omitted, the server will be restarted if required. ### Parameter Details - **Required?**: false - **Position?**: named - **Default value**: False ## NoFireWallRules (SwitchParameter) ### Description Specifies not to add firewall rules to allow the RAS VDI Agent to communicate when installing the VDI Agent. If this parameter is omitted, the firewall rules will not be added. ### Parameter Details - **Required?**: false - **Position?**: named - **Default value**: False ## Username (string) ### Description An administrator account for push installing the RAS VDI Agent on the server. If this parameter is omitted, your RAS admin username (and password) will be used. If this parameter is specified, the password parameter will also be required to be specified. ### Parameter Details - **Required?**: false - **Position?**: named - **Default value**: ## Password (SecureString) ### Description The password of the account specified in the Username parameter. If this parameter is specified, the username parameter will also be required to be specified. ### Parameter Details - **Required?**: false - **Position?**: named - **Default value**: ## VDIAgent (string) ### Description FQDN or IP address of the server where the RAS VDI Agent is running. ### Parameter Details - **Required?**: false - **Position?**: named - **Default value**: ## ProviderUsername (string) ### Description A user account to log in to the hypervisor management tool (e.g. VMware vCenter). In case of Azure, it is an ID of the application which will be used by VDI agent to manage Azure resources. ### Parameter Details - **Required?**: true - **Position?**: named - **Default value**: ## ProviderPassword (SecureString) ### Description The password of the account specified in the ProviderUsername parameter. In case of Azure, it is a secret key of the application which will be used by VDI agent to manage Azure resources. ### Parameter Details - **Required?**: true - **Position?**: named - **Default value**: ## Port (uint) ### Description The port to communicate with the Provider specified in Server parameter. In case of Azure, it is not required. ### Parameter Details - **Required?**: false - **Position?**: named - **Default value**: ## PreferredBrokerObj ([Broker](https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/types/broker)) ### Description The preferred Connection Broker server. To obtain an object of type Broker representing the preferred Connection Broker, use the Get-RASBroker cmdlet. ### Parameter Details - **Required?**: false - **Position?**: named - **Default value**: ## PreferredBrokerId (uint) ### Description The preferred Connection Broker ID. ### Parameter Details - **Required?**: false - **Position?**: named - **Default value**: ## UseAllGuests (bool) ### Description Use all guests. ### Parameter Details - **Required?**: false - **Position?**: named - **Default value**: ``` -------------------------------- ### Retrieve Site Information Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/get-rassite Examples demonstrating how to list all sites or filter by specific site identifiers. ```powershell Get-RASSite | Format-List ``` ```powershell Get-RASSite "My-Site" ``` ```powershell Get-RASSite -Id 1 ``` -------------------------------- ### Import and Generate Certificates with New-RASCertificate Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/new-rascertificate Examples demonstrating how to import existing certificates or generate new ones using various parameters. ```powershell New-RASCertificate -Name "ImportedCert" -SiteId 1 -Description "Certificate" -Usage Gateway -Enabled $true -PrivateKeyFile "C:\key.pem" -CertificateFile "C:\cert.pem" ``` ```powershell New-RASCertificate -Name "ImportedPfx" -SiteId 1 -Description "Certificate" -Usage Gateway -Enabled $true -PfxFile "C:\cert.pfx" -PfxPassword $pfxPassword ``` ```powershell New-RASCertificate -Name "SelfSignedCert" -SiteId 1 -Description "Certificate" -Usage Gateway -Enabled $true -Email "" -CommonName "TestCert" -AlternateNames "DNS:*.example.com,IP:1.2.3.4,IP:::1" ``` ```powershell New-RASCertificate -Name "CertRequest" -SiteId 1 -Description "Certificate" -Usage Gateway -Enabled $true -Email "" -CommonName "TestCert" -RequestFile "C:\req.crt" -AlternateNames "DNS:example.com,IP:1.2.3.4,IP:::1" ``` -------------------------------- ### Remove-RASFSLogixVHDLocation Examples Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/remove-rasfslogixvhdlocation Examples demonstrating how to remove VHD locations using different parameters. ```powershell Remove-RASFSLogixVHDLocation -DefObjType RDSDef -ProfileContainer -VHDLocation "type=smb,connectionString=Location1" ``` ```powershell Remove-RASFSLogixVHDLocation -Name "RDSHostPool1" -ObjType RDSHostPool -ProfileContainer -VHDLocation "C:/Test2" ``` -------------------------------- ### Restart a VM using Pipeline Input Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/restart-rasvm This example demonstrates restarting a virtual machine by piping a VM object obtained from Get-RASVM to the Restart-RASVM cmdlet. This is useful when you have already retrieved the VM object. ```powershell Get-RASVM -ProviderId 2 -Id 42311235-09c5-ca15-337d-b9723015edf0 | Restart-RASVM ``` -------------------------------- ### Reset a Virtual Machine using Pipeline Input Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/reset-rasvm This example demonstrates resetting a virtual machine by piping a VM object obtained from Get-RASVM to Reset-RASVM. ```powershell Get-RASVM -ProviderId 2 -Id 42311235-09c5-ca15-337d-b9723015edf0 | Reset-RASVM ``` -------------------------------- ### New-RASEnrollmentServer Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/new-rasenrollmentserver Creates a new Enrollment server. You can specify the Site ID, description, and whether to enable the server upon creation. For remote installation, you can provide administrator credentials. ```APIDOC ## New-RASEnrollmentServer ### Description Creates a new Enrollment server. ### Method POST (Conceptual - this is a PowerShell cmdlet, not a direct HTTP API call) ### Endpoint N/A (PowerShell Cmdlet) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None (Parameters are passed directly to the cmdlet) ### Cmdlet Parameters - **Server** (string) - Required - The name of the target enrollment server. - **SiteId** (uint) - Optional - Site ID in which to create the specified enrollment server. Defaults to the Licensing Server's site ID if omitted. - **Description** (string) - Optional - The enrollment server description. - **Enabled** (bool) - Optional - Enable or disable the enrollment server upon creation. Defaults to disabled if omitted. - **Username** (string) - Required (if NoInstall is used without default credentials) - An administrator account for remote installing the enrollment agent on the server. - **Password** (SecureString) - Required (if NoInstall is used without default credentials) - Password of the account specified in the username parameter. - **NoFireWallRules** (SwitchParameter) - Optional - If omitted, firewall rules will be added. Defaults to adding firewall rules. - **NoInstall** (SwitchParameter) - Optional - Specifies not to install enrollment agent on the server. If omitted, the enrollment server will be push installed using RAS admin credentials. ### Request Example ```powershell New-RASEnrollmentServer -Server "MyEnrollmentServer" -SiteId 1 -Description "Primary Enrollment Server" -Enabled $true ``` ### Response #### Success Response (200) Returns an EnrollmentServer object. #### Response Example ```json { "Id": "1", "Name": "MyEnrollmentServer", "SiteId": "1", "Description": "Primary Enrollment Server", "Enabled": true, "Status": "Online" } ``` ``` -------------------------------- ### Remove-RASCriteriaSecurityPrincipal Examples Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/remove-rascriteriasecurityprincipal Examples demonstrating the usage of the Remove-RASCriteriaSecurityPrincipal cmdlet with different parameters, including RuleId. ```APIDOC ## EXAMPLES **---------- EXAMPLE 1 ----------** Remove-RASCriteriaSecurityPrincipal -Id 1 -ObjType MFA -Account "JaneDoe" Removes a user from the Criteria Security Principal List within the Criteria Settings of the specified MFA by ID. **---------- EXAMPLE 2 ----------** Remove-RASCriteriaSecurityPrincipal -Name "Logon1" -ObjType MFA -Account "SID://DOMAIN/JaneDoe" Removes a user from the Criteria Security Principal List within the Criteria Settings of the specified MFA by Name. ``` -------------------------------- ### CreateShortcutInStartFolder Property Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/set-raspubvdidesktop Determines if a shortcut should be created in the client's Start folder. ```APIDOC ## CreateShortcutInStartFolder Property ### Description Create a shortcut in the client's Start folder. ### Properties - **Required?** (boolean) - false - **Position?** (string) - named - **Default value** (string) - - **Accept pipeline input?** (boolean) - false - **Accept wildcard characters?** (boolean) - false ``` -------------------------------- ### Retrieve Tunneling Policies Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/get-rastunnelingpolicy Examples demonstrating how to fetch tunneling policies using different parameters. ```powershell Get-RASTunnelingPolicy ``` ```powershell Get-RASTunnelingPolicy -IP "1.2.3.4" ``` ```powershell Get-RASTunnelingPolicy -Id 1 ``` -------------------------------- ### Assign Application Package Example Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/add-rasapppackageassigned Demonstrates assigning a specific application package version to a VDI pool. ```powershell Add-RASAppPackageAssigned -Id 3 -ObjType VDIPool -PackageName Mozilla.MozillaFireFox -Version 99.0.0.0 ``` -------------------------------- ### Create a New Custom Route Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/new-rascustomroute Example demonstrating how to create a new Custom Route with a specified name. ```powershell New-RASCustomRoute -Name "My Custom Route" -PublicAddress ``` -------------------------------- ### Modify Rule Description Example Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/set-rasrule Example demonstrating how to update the description of a specific rule within a client policy. ```powershell Set-RASRule -Id 1 -ObjType ClientPolicy -RuleId 2 -Description Test ``` -------------------------------- ### New-RASPubAVDDesktop Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/index-2 Adds a published AVD desktop to a site. ```APIDOC ## New-RASPubAVDDesktop ### Description Adds a published AVD desktop to a site. ### Method POST ### Endpoint /api/v1/sites/{siteId}/publisheddesktops/avd ### Parameters #### Path Parameters - **siteId** (string) - Required - The ID of the RAS Site. #### Request Body - **desktopName** (string) - Required - The name of the AVD desktop. - **hostPoolId** (string) - Required - The ID of the AVD host pool. ### Request Example { "desktopName": "My Virtual Desktop", "hostPoolId": "avd-host-pool-123" } ### Response #### Success Response (200) - **publishedDesktopId** (string) - The ID of the newly published AVD desktop. #### Response Example { "publishedDesktopId": "pub-desktop-xyz-789" } ``` -------------------------------- ### Set-RASFSLogixFolderExclusion Usage Examples Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/set-rasfslogixfolderexclusion Examples demonstrating how to modify FSLogix folder exclusion settings using the Set-RASFSLogixFolderExclusion cmdlet. ```powershell Set-RASFSLogixFolderExclusion -DefObjType RDSDef -ProfileContainer -Folder "C:/Test1" -ExcludeFolderCopy None ``` ```powershell Set-RASFSLogixFolderExclusion -Name "RDSHostPool1" -ObjType RDSHostPool -ProfileContainer -Folder "C:/Test2" -ExcludeFolderCopy None ``` -------------------------------- ### Retrieve SAMLIDP Information Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/get-rassamlidp Examples demonstrating how to fetch SAMLIDP details using either the name or the unique ID of the provider. ```powershell Get-RASSAMLIDP "My SAMLIDP" | Format-List ``` ```powershell Get-RASSAMLIDP -Id 10 ``` -------------------------------- ### Start-RASVM Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/start-rasvm Starts a virtual machine using its Provider ID and VM ID, or by piping a VM object from Get-RASVM. ```APIDOC ## Start-RASVM ### Description Starts a virtual machine. ### Method POST (Implied, as it's an action on a resource) ### Endpoint /api/v1/vms/{vmId}/start (Hypothetical, based on typical RESTful actions) ### Parameters #### Path Parameters - **ProviderId** (uint) - Required - The name of the target Provider server. - **Id** (string) - Required - Target virtual machine UUID. #### Query Parameters None explicitly defined for this method signature. #### Request Body - **InputObject** (VM) - Required - The VM object on which to perform the power operation. This can be obtained using the Get-RASVM cmdlet. ### Request Example ```json { "ProviderId": "2", "Id": "42311235-09c5-ca15-337d-b9723015edf0" } ``` ### Request Example (using pipeline) ```powershell Get-RASVM -ProviderId 2 -Id 42311235-09c5-ca15-337d-b9723015edf0 | Start-RASVM ``` ### Response #### Success Response (200) - **Status** (string) - Indicates the operation was successful. #### Response Example ```json { "Status": "Success" } ``` ### Related Commands * Get-RASVM * Stop-RASVM * Suspend-RASVM * Reset-RASVM * Restart-RASVM ``` -------------------------------- ### Import MFA Users via PowerShell Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/add-rasmfausers Examples demonstrating how to import MFA users from a CSV file using different provider types and site configurations. ```powershell Add-RASMFAUsers -FilePath "users.csv" -Type TOTP ``` ```powershell Add-RASMFAUsers -FilePath "users.csv" -Type EmailOTP -MFAId 1 ``` ```powershell Add-RASMFAUsers -FilePath "users.csv" -SiteId 2 -Type TOTP ``` -------------------------------- ### Add RAS Connection Broker Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/new-rasbroker This command adds a RAS Connection Broker server to a specified site. It supports installing the agent software by default, with options to skip installation, restart, or firewall rule creation. Credentials can be provided for agent installation. ```APIDOC ## New-RASBroker ### Description Adds a RAS Connection Broker server to a site. The agent software will be installed on the server by default. You can optionally skip the agent installation by including the -NoInstall parameter. ### Method POST (Conceptual - This is a PowerShell command, not a direct HTTP API call) ### Endpoint N/A (PowerShell Command) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Parameters - **Server** (string) - Required - FQDN or IP address of the server to add to a site as a RAS Connection Broker. - **SiteId** (uint) - Optional - Site ID to which to add the RAS Connection Broker server. If omitted, the Licensing Server site ID will be used. - **Username** (string) - Required (if Password is provided) - An administrator account for push installing the agent on the server. If omitted, your RAS admin username and password will be used. - **Password** (SecureString) - Required (if Username is provided) - The password of the account specified in the Username parameter. - **NoInstall** (SwitchParameter) - Optional - Specifies not to install the agent software on the server. If omitted, the agent will be push installed using RAS admin credentials. - **NoRestart** (SwitchParameter) - Optional - Specifies not to restart the server after the RAS Connection Broker is installed. If omitted, the server will be restarted if required. - **NoFireWallRules** (SwitchParameter) - Optional - Specifies not to add firewall rules to allow the RAS Connection Broker to communicate. If omitted, the firewall rules will not be added. - **Takeover** (SwitchParameter) - Optional - Specifies to takeover the RAS Connection Broker that is installed on the server, if installed. If omitted and the RAS Connection Broker is installed, this service will not be taken over. ### Request Example ```powershell New-RASBroker -Server "broker.example.com" -SiteId 1 -Username "admin" -Password "SecurePassword" -NoInstall ``` ### Response #### Success Response (200) Returns a [Broker](https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/types/broker) object representing the newly added RAS Connection Broker. #### Response Example ```json { "BrokerId": "guid-of-the-broker", "ServerName": "broker.example.com", "SiteId": 1 // ... other broker properties } ``` ``` -------------------------------- ### Create Published RDS Desktop Example Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/new-raspubrdsdesktop Creates a new published RDS desktop with the specified name. ```powershell New-RASPubRDSDesktop "My RDS Desktop" ``` -------------------------------- ### Virtual Machine List Output Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/examples/rdstemplate Example output showing the list of virtual machines retrieved from the RAS provider. ```text Name State ID Host ID Site ID ---- ----- -- ------- ------- WinSrv-2012R2 On 564d5e6f-3fad-bcf9-7c6b-bac9f212713d 1 1 ``` -------------------------------- ### New-RASPubRDSDesktop Source: https://docs.parallels.com/landing/ras-powershell-api-guide/v20/parallels-ras-powershell-admin-module/commands/index Adds a published desktop to a site. ```APIDOC ## New-RASPubRDSDesktop ### Description Adds a published desktop to a site. ```