## PowerCLI Reference

# Get-CIVMTemplate

## Synopsis

This cmdlet retrieves the virtual machine templates in the cloud.

Syntax

Get-CIVMTemplate [-VAppTemplate <CIVAppTemplate[]>] [[-Name] <String[]>] [-Server <CIServer[]>] [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-PipelineVariable <String>] [<CommonParameters>]
Get-CIVMTemplate -Id <String[]> [-Server <CIServer[]>] [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-PipelineVariable <String>] [<CommonParameters>]
Get-CIVMTemplate -Catalog <Catalog[]> [[-Name] <String[]>] [-Server <CIServer[]>] [-InformationAction <ActionPreference>] [-InformationVariable <String>] [-PipelineVariable <String>] [<CommonParameters>]

Related Commands

Online version

Detailed Description

This cmdlet retrieves the virtual machine templates in the cloud and filters them by the provided parameters.

Parameters

Name | Type | Description | Required? | Pipeline Input | Default Value
--- | --- | --- | --- | --- | ---
Name | String[] | Specifies the names of the cloud virtual machine templates you want to retrieve. | false | false
Catalog | Catalog[] | Specifies the catalogs from which you want to retrieve cloud virtual machine templates. | true | true (ByValue)
Id | String[] | Specifies the IDs of the cloud virtual machine templates you want to retrieve. Note: When a list of values is specified for the Id parameter, the returned objects would have an ID that matches exactly one of the string values in that list. | true | false
InformationAction | ActionPreference |  | false | false
InformationVariable | String |  | false | false
PipelineVariable | String |  | false | false
Server | CIServer[] | Specifies the cloud servers on which you want to run the cmdlet. If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer. | false | false
VAppTemplate | CIVAppTemplate[] | Specifies the vApp templates from which you want to retrieve cloud virtual machine templates. | false | true (ByValue)

Return Type

Zero or more CIVMTemplate objects

Notes

Examples

-------------- Example 1 --------------

    Get-Catalog "myCatalog" | Get-CIVMTemplate

Retrieves all cloud virtual machine templates from a catalog named "myCatalog".

-------------- Example 2 --------------

    Get-CIVAppTemplate "myCIVAppTemplate" | Get-CIVMTemplate -Name "myVMTemplate"

Retrieves a cloud virtual machine template named "myVMTemplate" from a vApp template named "myCIVAppTemplate".

Copyright © VMware, Inc. All rights reserved.