VMware Cloud Community
tschmi1988
Contributor
Contributor
Jump to solution

get-template -location $cluster doesn't work

Hi.

I found out that

$cluster = get-cluster "clustername"

get-template -location $cluster

doesn't work. The error message is:

get-template : 16.04.2018 10:22:20      Get-Template            ClusterImpl is not a valid location type for Get-Template.

In Zeile:1 Zeichen:1

+ get-template -location $cluster

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

    + CategoryInfo          : InvalidArgument: (AL_CL-cloud01:ClusterImpl) [Get-Template], VimException

    + FullyQualifiedErrorId : Core_ContainerCmdletBase_GetValidLocations_InvalidLocation,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetTemplate

get-template : 16.04.2018 10:22:20      Get-Template            The values specified for the Location parmeter are not valid for the Get-Template cmdlet.

In Zeile:1 Zeichen:1

+ get-template -location $cluster

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

    + CategoryInfo          : InvalidArgument: (VMware.VimAutom...y.VIContainer[]:VIContainer[]) [Get-Template], VimException

    + FullyQualifiedErrorId : Core_ContainerCmdletBase_TryValidateParameterList_AllLocationsAreInvalid,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetTemplate

The same with get-vm -location $cluster works without any problems.

In the PowerCLI Reference is written, that the parameter location is available.

Does anyone have an idea where the error is?

Thanks.

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

I'm afraid that is a bug that has been there for a long time, see Get-template -location clustername |VMware Communities

I provided a bypass in that thread.

You can open a SR to report the "feature".


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
3 Replies
LucD
Leadership
Leadership
Jump to solution

I'm afraid that is a bug that has been there for a long time, see Get-template -location clustername |VMware Communities

I provided a bypass in that thread.

You can open a SR to report the "feature".


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
tschmi1988
Contributor
Contributor
Jump to solution

Hi.


Thanks for your help. I thought that the PowerCLI developers read maybe this thread, because I opened before a SR and this was the not very friendly answer:

I understand from your case description that you require assistance in PowerCLI. I am from the core team and Im not trained on PowerCLI, I can assist you with issues on the vCenter. For PowerCLI support you must require SDK support, but your license agreement is not entitled for it hence I would not be able to assist you with this issue.

As the issue is not related to vCenter, I am archiving the case.

Thank you for contacting VMware Technical Support.

I report an error, but this is not reported to the developers Smiley Sad

0 Kudos
LucD
Leadership
Leadership
Jump to solution

Ouch, that answer from support is not correct, see PowerCLI Support Breakdown

I'll contact some people of the PowerCLI Team.

Do you have the SR# handy?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos