4.5

Table Of Contents
VMware, Inc. 39
Chapter 3 Using View PowerCLI
Examples of Using View PowerCLI Cmdlets
TheViewPowerCLIcmdletsallowyoutoperformViewoperationsfromthecommandlineorfromscripts
insteadofusingViewAdministrator.Thefollowingsectionscontainexamplesthatyoucanadaptandapply
toyourownsystems.
Displaying Information About a View Connection Server Instance
DisplaytheconfigurationsettingsofaViewConnectionServerinstance.
Get-ConnectionBroker -displayName connsvr1
Updating the Configuration of a View Connection Server Instance
UpdatethesettingsfordirectconnectionsandsecureIDonaViewConnectionServerinstance.
Update-ConnectionBroker -displayName connsvr1 -directConnect $false -secureIdEnabled $true
-ldapBackupFrequency EveryWeek
Managing the Configuration of vCenter Servers in VMware View
AddanentryforavCenterServertotheViewconfiguration.
Add-ViewVC -serverName vc01.mydom.int -username Administrator -password clydenw
-displayName "VC-01" -createRampFactor 5 -deleteRampFactor 5
ReturninformationaboutavCenterServer.
Get-ViewVC -serverName vc01.mydom.int
ReturninformationaboutallvCenterServersinaspecifiedDNSdomain.
Get-ViewVC -serverName *.mycorp.com
ChangethevaluesoftherampfactorsforthevCenterServerthatisconfiguredonserversvr11.
Get-ViewVC -serverName svr11.mycorp.com | Update-ViewVC -createRampFactor 5 -deleteRampFactor 10
ChangethevalueofthecreaterampfactorforthevCenterServersthatareconfiguredintheDNSdomain
mycorp.com.
Get-ViewVC -serverName *.mycorp.com | Update-ViewVC -createRampFactor 5
RemoveanentryforavCenterServerfromtheconfiguration.
Get-ViewVC -serverName vc02.mydom.int | Remove-ViewVC
Managing Desktop Pools
Returninformationaboutthedesktoppoolmypool.
Get-Pool -poolDisplayName mypool
Returninformationaboutalldesktoppoolswiththeprefixmypool.
Get-Pool -pool_id mypool-*
ReturninformationaboutalldesktoppoolsthatareconfiguredtousethePCoIPprotocol.
Get-Pool -protocol PCOIP
Returninformationaboutallindividualunmanageddesktoppools.
Get-Pool -poolType IndividualUnmanaged
Removethedesktoppooldtpool10.
Remove-Pool -pool_id dtpool-10
Removethedesktoppooldtpool12,terminatinganyactivesession,butwithoutdeletingtheimagefromdisk.
Remove-Pool -pool_id dtpool-12 -TerminateSession $true -DeleteFromDisk $false