5.2

Table Of Contents
VMware, Inc. 43
Chapter 3 Using View PowerCLI
Return information about all individual unmanaged desktop pools.
Get-Pool -poolType IndividualUnmanaged
Remove the desktop pool dtpool-10.
Remove-Pool -pool_id dtpool-10
Remove the desktop pool dtpool-12, terminating any active session, but without deleting the image from disk.
Remove-Pool -pool_id dtpool-12 -TerminateSession $true -DeleteFromDisk $false
Remove a desktop pool specified by its display name, and delete its image from disk.
Get-Pool -displayName "My Pool 1" | Remove-Pool -DeleteFromDisk $true
Creating and Updating Automatically Provisioned Desktop Pools
Add the automatically provisioned desktop pool auto1, which is managed by the vCenter Server
vc.mydom.int.
Get-ViewVC -serverName vc.mydom.int | Add-AutomaticPool -pool_id auto1 -displayName "ADP1"
-namePrefix "adp1-{n:fixed=4}" -vmFolderPath /AutoConfig/vm
-resourcePoolPath /AutoConfig/host/Resources -templatePath /AutoConfig/vm/ADP_template
-dataStorePaths /host/datastore_1/lun10 -customizationSpecName "Windows 7 Variation 3"
-minimumCount 4 -maximumCount 10
Update the configuration of the automatically provisioned desktop pool auto1.
Update-AutomaticPool -pool_id auto1 -displayName "Automatic Desktop Pool 1"
-isProvisioningEnabled $false -dataStorePaths /host/datastore_1/lun10;/host/datastore_1/lun12
The datastores that you specify as arguments to -datastorePaths override the previous setting. You must
specify the existing datastores to retain them for use by the pool.
Creating and Updating Linked-Clone Desktop Pools
Add the linked-clone desktop pool lcdpool_1, which is managed by View Composer on the vCenter Server
vc.mydom.int.
Get-ViewVC -serverName vc.mydom.int | Get-ComposerDomain -domain VCDOM |
Add-AutomaticLinkedCLonePool -pool_id lcdpool_1 -displayName "LCD Pool 1"
-namePrefix "lcp1-{n}-dt" -parentVMPath /AutoPoolVMs/parent
-parentSnapshotPath /AutoPoolSnapshots/parent1_snapshot -vmFolderPath /AutoConfig/VM_folder
-resourcePoolPath /AutoConfig/host/Resources
-datastoreSpecs [Aggressive,os,data]/host/datastore_1/lun04;/host/datastore_2/lun16
-dataDiskLetter "D" -dataDiskSize 100 -minimumCount 4 -maximumCount 10
If you specify a persistent data disk, use an uppercase letter for the drive. Do not use a letter that already exists
on the parent virtual machine for a drive such as A, B, or C, or that conflicts with a network-mounted drive.
Update the configuration of the linked-clone desktop pool lcdpool_1.
Get-ViewVC -serverName vc.mydom.int | Get-ComposerDomain -domain VCDOM |
Update-AutomaticLinkedCLonePool -pool_id lcdpool_1 -datastoreSpecs
[Conservative,os,data]/host/datastore_1/lun04;/host/datastore_2/lun16;/host/datastore_2/lun22
-minimumCount 4 -maximumCount 20 -headroomCount 2 -powerPolicy Suspend -defaultProtocol PCOIP
-isUserResetAllowed $true
The datastores that you specify as arguments to -datastoreSpecs override the previous setting. You must
specify the existing datastores to retain them for use by the pool.
Rebalance desktops in the linked-clone desktop pool lcdpool_2 among the available datastores.
N
OTE To provision all the desktops in advance of their use, set -minimumCount and -maximumCount to the
same value.
NOTE To provision all the desktops in advance of their use, set -minimumCount and -maximumCount to the
same value.