5.0

Table Of Contents
VMware View Integration
30 VMware, Inc.
Start the PowerShell Console with View PowerCLI Loaded
You can run the View PowerCLI cmdlets directly on a View Connections Server host that has the following
software installed.
VMware View 4.5 or later
Microsoft .NET framework
Windows PowerShell 1.0
To use the View PowerCLI cmdlets to change the configuration of View, you must be logged into a View
Connection Server instance as a user in a role with sufficient privileges, such as the Administrators role. If your
role is a read-only role, you cannot update configuration data. For more information, see the VMware View
Administration document.
To start the PowerShell console with View PowerCLI loaded
1 Select Start > All Programs > VMware > View PowerCLI.
2 If you see an error message stating that the script configuration file cannot be loaded because the
execution of scripts is disabled, type the following PowerShell command and restart the PowerShell
console.
Set-ExecutionPolicy Unrestricted
Displaying Help for a View PowerCLI cmdlet
To list all View PowerCLI cmdlets, type this command in the PowerShell console.
Get-Command -PSSnapin VMware.View.Broker | more
You can get help for a specific cmdlet by using the Get-Help cmdlet in the PowerShell console. For example,
to get help on the Add-ViewVC cmdlet.
Get-Help Add-ViewVC | more
For more detailed information, add the -full parameter.
Get-Help Add-ViewVC -full | more
Alternatively, you can use the help alias for Get-Help.
help Add-ViewVC -full | more
Error Handling
View PowerCLI cmdlets handle all errors as non-terminating errors that halt the execution of a cmdlet but do
not terminate a pipeline. You can examine the $error automatic variable to determine the nature of an error.
You can set the standard PowerShell $ErrorActionPreference and $errorView automatic variables to
control how PowerShell handles non-terminating errors and how it displays them in the shell.
Error When Piping and Specifying Objects at the Same Time
If you attempt to pipe an object into a cmdlet and specify an object of the same type to that cmdlet, the cmdlet
fails with the following error.
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.
For example, the following cmdlet usage would produce this error.
Get-Pool -pool_id Pool1 | Update-ManualPool -pool_id Pool2 -displayName “Manual Pool 2”