4.6
Table Of Contents
- VMware View Integration
- Contents
- Introduction
- Integrating with the Event Database
- Using View PowerCLI
- Introduction to View PowerCLI
- View PowerCLI Cmdlets
- View Administrator, View PowerCLI Cmdlet, and vdmadmin Operations
- View PowerCLI Cmdlet Parameters
- Examples of Using View PowerCLI Cmdlets
- Displaying Information About a View Connection Server Instance
- Updating the Configuration of a View Connection Server Instance
- Managing the Configuration of vCenter Servers in VMware View
- Managing Desktop Pools
- Creating and Updating Automatically Provisioned Desktop Pools
- Creating and Updating Linked-Clone Desktop Pools
- Creating and Updating Manually Provisioned Desktop Pools
- Creating Manual Unmanaged Desktop Pools
- Creating and Updating Desktops Provisioned by Terminal Servers
- Obtaining Information About Users and Groups from Active Directory
- Managing Desktop Entitlements
- Managing Local Desktops
- Managing Remote Sessions
- Managing Virtual Machines
- Displaying Information About Physical Computers
- Updating the Ownership of Machines
- Displaying Information About Events
- Managing the Global Configuration of VMware View
- Managing View Licenses
- Examples of Using View PowerCLI for Enhanced Functionality
- Customizing LDAP Data
- Integrating with SCOM
- View Management Packs
- Name a View Connection Server Group
- Import the View MPs
- View Discovery Script
- Run the Discovery Script
- Display Discovered Objects
- Display Managed Objects
- Views and Monitors
- Enable a Proxy Agent on a Server
- Display Performance Data
- Display Information About an Alert
- Restart a Service
- Exclude a Domain from Connectivity Monitoring
- Close Alerts
- Class and Relationship Definitions
- Index
VMware View Integration
30 VMware, Inc.
Start the PowerShell Console with View PowerCLI Loaded
YoucanruntheViewPowerCLIcmdletsdirectlyonaViewConnectionsServerhostthathasthefollowing
softwareinstalled.
VMwareView4.5orlater
Microsoft.NETframework
WindowsPowerShell1.0
TousetheViewPowerCLIcmdletstochangetheconfigurationofView,youmustbeloggedintoaView
ConnectionServerinstanceasauserinarolewithsufficientprivileges,suchastheAdministratorsrole.Ifyour
roleisaread‐onlyrole,youcannotupdateconfiguration
data.Formoreinformation,seetheVMwareVi e w
Administrationdocument.
To start the PowerShell console with View PowerCLI loaded
1 SelectStart>AllPrograms>VMware >ViewPowerCLI.
2Ifyouseeanerrormessagestatingthatthescriptconfigurationfilecannotbeloadedbecausethe
executionofscriptsisdisabled,typethefollowingPowerShellcommandandrestartthePowerShell
console.
Set-ExecutionPolicy Unrestricted
Displaying Help for a View PowerCLI cmdlet
TolistallViewPowerCLIcmdlets,typethiscommandinthePowerShellconsole.
Get-Command -PSSnapin VMware.View.Broker | more
YoucangethelpforaspecificcmdletbyusingtheGet-HelpcmdletinthePowerShellconsole.Forexample,
togethelpontheAdd-ViewVCcmdlet.
Get-Help Add-ViewVC | more
Formoredetailedinformation,addthe-fullparameter.
Get-Help Add-ViewVC -full | more
Alternatively,youcanusethe
helpaliasforGet-Help.
help Add-ViewVC -full | more
Error Handling
ViewPowerCLIcmdletshandleallerrorsasnon‐terminatingerrorsthathalttheexecutionofacmdletbutdo
notterminateapipeline.Youcanexaminethe$errorautomaticvariabletodeterminethenatureofanerror.
YoucansetthestandardPowerShell$ErrorActionPreferenceand$errorViewautomaticvariablesto
controlhow
PowerShellhandlesnon‐terminatingerrorsandhowitdisplaysthemintheshell.
Error When Piping and Specifying Objects at the Same Time
Ifyouattempttopipeanobjectintoacmdletandspecifyanobjectofthesametypetothatcmdlet,thecmdlet
failswiththefollowingerror.
The input object cannot be bound to any parameters for the command either because the command
does not take pipeline input or the input and its properties do not match any of the parameters
that take pipeline input.
Forexample,thefollowingcmdletusagewouldproducethiserror.
Get-Pool -pool_id Pool1 | Update-ManualPool -pool_id Pool2 -displayName “Manual Pool 2”