Previous Topic: dpmhv-ShowSCVMMOSProfiles (Funclet) Command--Show all Guest OS ProfilesNext Topic: dpmhv-ShowVMDisks (Funclet) Command--Show all Virtual Disks


dpmhv-ShowTemplates (Funclet) Command--Show Templates on a Hyper-V Host

The dpmhv-ShowTemplates command returns a list of templates on the Hyper-V host or a Microsoft System Center Virtual Machine Manager (SCVMM) library server. The templates are the exported VMs which are managed in a template catalog and are used to provision new VMs.

This command has the following format:

dpmhv-showTemplates 
[-host hostname] 
[-scvmmHost scvmmHost] 
[-detail]
[-retval] 
[-silent]
-host hostname

Specifies the name of the Hyper-V server host.

-scvmmHost scvmmHost

(Optional) Specifies the name of the SCVMM library server. This parameter returns the templates created and maintained externally using SCVMM on the specified library server. This parameter is valid when you use SCVMM integration to provision VMs.

-detail

(Optional)Displays the details of the list of templates.

-retval

Returns a value for further processing.

-silent

Specifies not to direct the output to the screen.

Return Value

The dpmhv-ShowTemplates command returns an array of objects representing the templates.

The following properties are returned in regular mode:

The following properties are returned in detail mode:

Example: Get a List of VM Templates

This example returns the list of VM templates.

dpmhv-showTemplates 
-host hvserver

Example: Get detailed information of templates and process

This example returns a list of template with detailed information of templates and process.

tt = dpmhv-showTemplates -host hvserver -silent -retval
for each(t in tt)
? t.ElementName, t.Description