VMware Cloud Community
evandermeer
Contributor
Contributor

Argument 'uriTemplate' must not be null. Parameter name: uriTemplate

We are working on some scripts to automate vCloud Director tasks, a few of the functions within the script do not work and we receive an error:

Exception calling "UpdateServerData" with "0" argument(s): "Argument 'uriTemplate' must not be null.

Parameter name: uriTemplate"

The function we are calling is for example 'SetDCVMCPUCount' for a specific VM with a count of the number of vCPU's.

+         $objVMHW.UpdateServerData()

+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException

    + FullyQualifiedErrorId : CloudException

Do you have any idea what's going on here?

Are we missing something?

We're using PowerCLI 10.0 with a vCD 9.0 environment.

Tags (2)
0 Kudos
1 Reply
RvdNieuwendijk
Leadership
Leadership

Unfortunately, PowerCLI v10.0 is not compatible with vCloud Director v9.0. You could use the Command Line Interface for VMware vCloud Director, available from https://vmware.github.io/vcd-cli. Or you could use the vCloud Director REST API with the PowerShell Invoke-RestMethod cmdlet.

Blog: https://rvdnieuwendijk.com/ | Twitter: @rvdnieuwendijk | Author of: https://www.packtpub.com/virtualization-and-cloud/learning-powercli-second-edition
0 Kudos