Book Image

Citrix XenDesktop Cookbook-Third Edition

By : Gaspare Silvestri
Book Image

Citrix XenDesktop Cookbook-Third Edition

By: Gaspare Silvestri

Overview of this book

Table of Contents (18 chapters)
Citrix XenDesktop Cookbook Third Edition
Disclaimer
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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:

  1. Connect to one of the Desktop Broker servers.

  2. Click on the PowerShell icon installed on the Windows taskbar.

  3. Load the PowerShell modules by typing the following command, and then press the...