Skip to content

Creating Remote Workstations from an Azure Image

This section outlines the steps involved, and the prerequisite software and components required, to configure an Azure image through Cloud Access Manager. You must first create the image and then update or create a remote workstation template. For an increased level of security Teradici recommends users use managed disks instead of unmanaged disks.

Microsoft Azure PowerShell Required

You are required to have the Microsoft Azure PowerShell module installed and configured in your PowerShell session.

Prerequisites for Configuring an Azure Image

The Azure image needs to be prepared and generalized before it is uploaded to Azure. This is done with the Sysprep tool through the Windows command prompt. For information on how to perform these steps, see Azure and Virtual Machine Information.

Script Execution Policy

If you are deploying your own Windows VHD image and not an Azure image provided through Azure, you need to enable the Script Execution policy from within the Group Policies in the Domain Controller, and set the value to Allow all scripts.

PCoIP Agent Installation on an Azure Image

If you are creating your own image do not install a PCoIP Agent on the image you are creating. The PCoIP Agent will be installed on the Azure image when Cloud Access Manager deploys the remote workstation.

Startup Type Value

Before you create an image based on Windows 10, change the startup type value for the Windows Remote Management service, WS-Management or WinRM, from Automatic [Delayed Start] to Automatic. This ensures the Azure DSC configuration runs when the machine is deployed. If this value is not changed the PCoIP Agent installation and licensing will not be performed when the remote workstation is created.

Creating an Azure Image

This section outlines how to create an Azure image file, and prepare it to be used in a new remote workstation deployment. You need to perform a regedit configuration and run the sysprep tool in the command prompt on your remote workstation:

  1. Click on the resource group name>-CN1 resource group, select CAM-ApplicationGateway1, and copy the public IP address from the list of options.
  2. Open the Teradici PCoIP Client and paste the IP address into the Host Address field, name your connection and click NEXT. VHD PCoIP Client
  3. Enter your Administration credentials for the deployment, and click LOGIN.
  4. Select the remote workstation you want to access, and click CONNECT.
  5. Once you have access to the remote workstation, navigate to the Regedit directory.
  6. Click HKEY_Local_Machine>Software>Microsoft>Azure>DSC>[DSC Version]>Status. VHD Regedit
  7. Clear the data field for the State file and click Save.
  8. Clean and clear the cached DSC scripts. Delete the local folder C:\Packages\Plugins\Microsoft.Powershell.DSC\ [DSC-Version]\DSCWork\Install-PCoIPAgent.ps1.0 and all its contents.
  9. Open a command prompt window as an administrator, and run the Sysprep tool. Change the directory to %windir%\system32\sysprep and run the sysprep.exe command. Sysprep Command Prompt
  10. Click the Generalize option and select Shutdown from the System Preparation Tool window. Sysprep General
  11. If you have multiple subscriptions you should first verify that you are in the correct subscription by using the Get-AzureRmContext command. You can change subscriptions by using the Set-AzureRmContext command.
  12. Once the OS has shut down, go the Azure portal and in the Azure Cloud Shell terminal deallocate the remote workstation using Stop-AzureRmVM:
    $rw = "<Name-of-RW>"
    $rg = "<Name-of-RG>"
    Stop-AzureRmVM -ResourceGroupName $rg -Name $rw -Force
    # Run the following command to set the status of the remote workstation to Generalized
    Set-AzureRmVM -ResourceGroupName $rg -Name $rw -Generalized
    # Once the remote workstation has been generalized, you need to convert it to an image by running the following command:
    $vm = Get-AzureRmVm -name $rw -ResourceGroupName $rg
    $image = New-AzureRmImageConfig -Location $vm.Location -SourceVirtualMachineId $vm.Id
    $imageInfo= New-AzureRmImage -Image $image -imageName $vm.Name -ResourceGroupName $vm.ResourceGroupName
  13. The $imageInfo.Id parameter will give you the image information you need when you are configuring the template file, as outlined below.


The Resource group refered to in the above command as "Name-of-RG" needs to be the resource group that ends in -RW, as this is the resource group where "Name-of-RW" is generally located.

Deploying a Remote Workstation with an Azure Image

This section outlines how to use the Cloud Access Manager Administrators management interface to create a remote workstation from the Azure image you created above. Access the Cloud Access Manager Administrators management interface, and click on Resource Configuration from the side menu to open the ARM Template and ARM Template Parameter files.

Configuring the Template File

This section outlines how to create a new .json template file that includes the Azure image you created and the parameters that need to be added, removed, and configured through the Cloud Access Manager Administrators management interface:

  1. Select the server2016-standard-agent.json from the ARM Template Files dropdown menu Standard Agent
  2. From the ARM Template Parameter File section navigate to the "imageReferenceId" parameter and populate the value: Image Reference ID This value is the $imageInfo.Id that you determined in step 12 above. You can also locate this information by going to the correct image through the Azure portal and clicking on the Properties field to locate the resource ID.
  3. Click Save Resource Configuration Template.

Creating a Remote Workstation Using an Azure Image

This section outlines how to use the Cloud Access Manager Administrators management interface to create a new remote workstation, based off the template file you configured with the Azure Image:

  1. Once you have configured the server2016-standard-agent.json file, click Save Resource Configuration Template As.
  2. Enter a file name and click Ok.
  3. Create a new remote workstation from within the Cloud Access Manager Administrators management interface, see Creating and Deleting Remote Workstations.

New Machine ARM Template

Ensure that you select the newly created template file with the correct parameters from the New Machine ARM Template dropdown menu.

The new remote workstation is now deploying. Select the Deployments tab within the resource group in the Azure Portal to track the deployment.