VMware Cloud Community
ganapa2000
Hot Shot
Hot Shot
Jump to solution

Get Template name and folder name

Hi,

Please help, how to get the Template Name and its folder name where is located.

I tried below command but it is not showing folder name

get-Folder | Get-Template Template-Windows2008R264bit

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

A longer, but faster, version.

Get-Template |

Select Name,

   @{N='Folder';E={(Get-View -Id $_.ExtensionData.Parent -Property Name).Name}}


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

View solution in original post

0 Kudos
3 Replies
Jac_
Contributor
Contributor
Jump to solution

Get-Template | select Name,@{N="Folder";E={Get-Folder -Id $_.FolderID}} | Format-Table -AutoSize

0 Kudos
LucD
Leadership
Leadership
Jump to solution

A longer, but faster, version.

Get-Template |

Select Name,

   @{N='Folder';E={(Get-View -Id $_.ExtensionData.Parent -Property Name).Name}}


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

0 Kudos
ganapa2000
Hot Shot
Hot Shot
Jump to solution

Thanks a lot, that worked Smiley Happy

0 Kudos