4.6

Table Of Contents
VMware, Inc. 29
3
ViewPowerCLIprovidesaneasytousePowerShellinterfacetoVMwareView .YoucanusetheView
PowerCLIcmdletstoperformvariousadministrationtasksonViewcomponents.
Thischapterincludesthefollowingtopics:
“IntroductiontoViewPowerCLIonpage 29
“ViewPowerCLICmdlets”onpage 31
“ViewPowerCLICmdletParameters”onpage 35
“ExamplesofUsingViewPowerCLICmdlets”onpage 39
Introduction to View PowerCLI
WindowsPowerShellisacommandlineandscriptingenvironmentthatisdesignedforMicrosoftWindows.
PowerShellusesthe.NETobjectmodelandprovidesadministratorswithmanagementandautomation
capabilities.Aswithanyotherconsoleenvironment,youworkwithPowerShellbyrunningcommands,which
arecalledcmdletsinPowerShell.
Thecommandline
syntaxfortheViewPowerCLIcmdletsisthesameasgenericPowerShellsyntax.Seethe
MicrosoftdocumentationformoreinformationaboutusingPowerShell.
VMwareView4.5includes45ViewPowerCLIcmdlets.Youcanusethesecmdletsinconjunctionwiththe
vSpherePowerCLIcmdlets,whichprovideanadministrativeinterfacetotheVMware
vSphereproduct.Ifyou
haveinstalledvSpherePowerCLIonaConnectionServerinstance,thesecmdletsareloadedautomatically
whenyoulaunchViewPowerCLI.
YoucanreferencevirtualmachinesandvCentersbyIDinViewPowerCLI,butyoucannotpasssuchentries
asobjects.Youmustprovideafullpathtoother
vSphereobjectssuchasresourcepoolsandfolders.Youcan
usetheViewPowerCLIcmdletstoexaminetheconfigurationofvCenterServerswithinVMwareView .
TheViewPowerCLIcmdletsarelocatedinthePowershellServiceCmdlets.dllfileinthedirectory
C:\Program Files\VMware\VMware View\Server\bin.ThisfileconstitutestheVMware.View.Broker
snapin.Thescriptconfigurationfileforthe
ViewPowerCLIcmdletsisnamedInitViewCmdlets.ps1,and
thisfileislocatedintheExtrasfolderintheViewinstallationdirectory.Youcaneditandextendthescriptto
definecmdletaliases,toconfiguretheenvironment,ortosetstartupactions.
Using View PowerCLI
3