Administering hosts and machines – Host and MachineCreation cmdlets
In this recipe, we will describe how to create the connection between the Hypervisor and the XenDesktop servers, and the way to generate machines to assign to the end users, all by using PowerShell.
Getting ready
No preliminary tasks are required. You have already installed the PowerShell SDK during the installation of the Desktop Controller role machine(s).
To be sure to be able to run a PowerShell script (the .ps1
format), you have to enable the script execution from the PowerShell prompt in this way:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force
How to do it…
In this section, we will discuss the PowerShell commands used to connect XenDesktop with the supported hypervisors plus the creation of the machines from the command line:
Connect to one of the Desktop Broker servers.
Click on the PowerShell icon installed on the Windows taskbar.
Load the PowerShell modules by typing the following command, and then press the...