You can use the Get-ViewVC and Update-AutomaticPool cmdlets to create and update automatically provisioned desktop pools.

In the following example, the Get-ViewVC cmdlet adds an automatically provisioned desktop pool called auto1. The desktop pool is managed by a vCenter Server instance called 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

You can provision all the desktops in advance by setting the -minimumCount and -maximumCount parameters to the same value.

In the following example, the Update-AutomaticPool cmdlet updates the configuration of an automatically provisioned desktop pool called auto1.

Update-AutomaticPool -pool_id auto1 -displayName "Automatic Desktop Pool 1"
-isProvisioningEnabled $false -dataStorePaths /host/datastore_1/lun10;/host/datastore_1/lun12

Because the datastores specified in the -datastorePaths parameter override the previous setting, you must specify any existing datastores in the parameter for the desktop pool to continue to use those datastores.