4.5

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.
VMwareView4.5
includes45ViewPowerCLIcmdlets.Youcanusethesecmdletsinconjunctionwiththe
vSpherePowerCLIcmdlets,whichprovideanadministrativeinterfacetotheVMwarevSphereproduct.You
canalsousetheViewPowerCLIcmdletstoexaminetheconfigurationofvCenterServersinVMwareView.
Thecommandlinesyntaxforthe
ViewPowerCLIcmdletsisthesameasgenericPowerShellsyntax.Seethe
MicrosoftdocumentationformoreinformationaboutusingPowerShell.
TheViewPowerCLIcmdletsarelocatedinthePowershellServiceCmdlets.dllfileinthedirectory
C:\Program Files\VMware\VMware View\Server\bin.ThisfileconstitutestheVMware.View.Broker
snapin.ThescriptconfigurationfilefortheViewPowerCLIcmdletsisnamed
InitViewCmdlets.ps1,and
thisfileislocatedintheExtrasfolderintheViewinstallationdirectory.Youcaneditandextendthescriptto
definecmdletaliases,toconfiguretheenvironment,ortosetstartupactions.
Start the PowerShell Console with View PowerCLI Loaded
YoucanruntheViewPowerCLIcmdletsdirectlyonaViewConnectionsServerhostthathasthefollowing
softwareinstalled.
VMwareView4.5orlater
Microsoft.NETframework
WindowsPowerShell1.0
TousetheViewPowerCLIcmdletstochangetheconfigurationofView,youmustbeloggedintoaView
ConnectionServerinstanceasauserinarolewithsufficientprivileges,suchastheAdministratorsrole.Ifyour
roleisareadonlyrole,youcannotupdateconfiguration
data.Formoreinformation,seetheVMwareVi e w
Administrator’sGuide.
Using View PowerCLI
3