5.2

Table Of Contents
VMware Horizon View Integration
44 VMware, Inc.
Get-DesktopVM -pool_id lcdpool_2 | Send-LinkedCloneRebalance -schedule 2011-05-10:01:00:00
-forceLogoff $false -stopOnError $true
Refresh the operating system disk of each linked-clone desktop by restoring it to its original state and size.
Get-DesktopVM -pool_id lcdpool_2 | Send-LinkedCloneRefresh -schedule "May 12 2011 01:15"
-forceLogoff $true -stopOnError $true
Recompose all linked-clone desktops from a snapshot of their parent virtual machine.
Get-DesktopVM -pool_id lcdpool_2 | Send-LinkedCloneRecompose -schedule ((Get-Date).AddHours(8))
-parentVMPath /AutoPoolVMs/parent2 -parentSnapshotPath /AutoPoolSnapshots/parent2_snapshot
-forceLogoff $true -stopOnError $true
Creating and Updating Manually Provisioned Desktop Pools
Create a manually provisioned desktop pool that contains the virtual machine myVM. To use the Get-VM
cmdlet, you must install vSphere PowerCLI.
Add-ManualPool -pool_id manPool -id (Get-VM -name "myVM").id -isUserResetAllowed $true
Create the manually provisioned desktop pool man1 from the desktops listed by the vCenter Server
vc.mydom.int.
Get-ViewVC -serverName vc.mydom.int | Get-DesktopVM -poolType Manual | Add-ManualPool -pool_id
man1 -isUserResetAllowed $false
Update the configuration of the manually provisioned desktop pool man1.
Update-ManualPool -pool_id man1 -displayName "Manual Desktop 1" -isUserResetAllowed $true
Creating Manual Unmanaged Desktop Pools
Create the unmanaged desktop pool unman1 that contains the physical machines pm01 and pm02.
Add-ManualUnmanagedPool -pool_id unman1 -pm_id_list pm01;pm02 -isUserResetAllowed $true
Update the configuration of the unmanaged desktop pool unman1.
Update-ManualUnmanagedPool -pool_id unman1 -displayName "Unmanaged Desktop 1"
-isUserResetAllowed $false
Creating and Updating Desktops Provisioned by Terminal Servers
Return information about a terminal server.
Get-TerminalServer -hostname tsvr01
Add the desktop pool tsd1 using a machine that is provided by the terminal server at a specified IP address.
Get-TerminalServer -hostname tsvr01 | Add-TerminalServerPool -pool_id tsd1 -displayName "Terminal
Server Desktop 1" -allowProtocolOverride $true
Update the configuration of the desktop pool tsd1, which uses a machine provided by a terminal server.
Get-TerminalServer -hostname tsvr01 | Update-TerminalServerPool -pool_id tsd1 -displayName
"Terminal Server Desktop 1" -allowProtocolOverride $false -autoLogoffTime 1
Obtaining Information About Users and Groups from Active Directory
Return information about users in the domain mydom.
Get-User -domain "mydom"
Return information about the user fred in the domain mydom and exclude any information about the users
group.
Get-User -name "fred" -domain "mydom" -includeGroup $false