April 29, 2013

Creating Horizon View 5.2 pools with Powershell

Most people have used the View Manager GUI to create new pools in their VMware Horizon View environments. In order to access some of the new functionality you are however required to use PowerShell (View PowerCLI) instead. The syntax for creating a linked clone pool is a follows:
NAME
    Add-AutomaticLinkedClonePool
SYNOPSIS
    Adds an automatically provisioned linked-clone pool.

SYNTAX
Add-AutomaticLinkedClonePool -Pool_id [<string>] [-Description [<string>]][-DisplayName [<string>]] [-Disabled [<Boolean>]] -Vc_id [<string>] [-Persistence [<string>]] -VmFolderPath [<string>] -ResourcePoolPath [<string>] -ParentVmPath [<string>] -ParentSnapshotPath [<string>] -DatastoreSpecs [<string>] -Composer_ad_id [<string>] [-OrganizationalUnit [<string>]] [-LogoffScript [<string>]] [-PostSyncScript [<string>]] [-UseUserDataDisk [<Boolean>]] [-UseTempDisk [<Boolean>]] [-DataDiskLetter [<string>]] [-DataDiskSize [<string>]] [-TempDiskSize [<string>]] [-RefreshPolicyType [<string>]] [-RefreshPolicyDays [<string>]] [-RefreshPolicyUsage [<string>]] [-CustomizationSpecName [<string>]] [-MinimumCount [<string>]] [-MaximumCount [<string>]][-HeadroomCount [<string>]] [-MinProvisionedDesktops [<string>]] [-DeletePolicy [<string>]] [-DnsSuffix [<string>]] -NamePrefix [<string>] [-PowerPolicy [<string>]] [-IsProvisioningEnabled [<Boolean>]] [-SuspendProvisioningOnError [<Boolean>]] [-IsUserResetAllowed [<Boolean>]] [AutoLogoffTime [<string>]] [-AllowMultipleSessions [<Boolean>]] [-FolderId [<string>]] [-DefaultProtocol [<string>]] [-AllowProtocolOverride [<Boolean>]] [-FlashQuality [string>]] [-FlashThrottling [<string>]] [-UseSeSparseDiskFormat [<Boolean>]] [-SeSparseThreshold [<string>]] [-NetworkLabelConfigFile [<string>]] [<CommonParameters>]

DESCRIPTION


RELATED LINKS
REMARKS
    To see the examples, type: "get-help Add-AutomaticLinkedClonePool -examples".
    For more information, type: "get-help Add-AutomaticLinkedClonePool -detailed".
    For technical information, type: "get-help Add-AutomaticLinkedClonePool -full".
As you can tell, this command can take quite a few parameters. In our case we had to specify quite a few of them as well in order to get things configured correctly. Figuring out the required parameters is easiest if you have an existing pool and run the command Get-Pool -Pool_id Poolname




Since we have multiple pools on multiple vCenter servers we would also get the advantage of pools that would have the exact same config if we scripted the configuration as human error is always a risk. The feature that triggered our interest in using this command was the new networking functionality where a single pool could span multiple VLANs. The VMware documentation showed us exactly how to get the needed config file setup. 

While we were able to create pools that used multiple VLANs by using this command we discovered a couple of limitations:
  1. We were not able to specify a user drive letter (got an error message if we specified it)
  2. 3D settings are not available for powershell
  3. Storage Accelerator settings were not available
We had to create manual steps for setting these options. We hope VMware will eventually fill this gap and make all options available from both powershell and the GUI.

1 comment:

  1. The 1,2,3 limitations at the end were three questions I was Googling separately! And you answered all 3 in one shot! Thanks!

    ReplyDelete