VMware Cloud Community
Chris1962
Contributor
Contributor
Jump to solution

How do I use get-template to get template name from a nested folder structure?

Say I have the following folder structure in my vCenter.

Templates (folder)

--- Project1Teamplates (sub-folder)

------ Linux-OS-template (template file)

------ Windows-OS-template (template file)

What is the syntax for get-template so it returns one of the template files in Project1Templates? I've tried several combintions to no avail.

Chris

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
RvdNieuwendijk
Leadership
Leadership
Jump to solution

You can try:

Get-Folder -Name Templates |
Get-Folder -Name Project1Teamplates |
Get-Template -Name Linux-OS-template 

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

View solution in original post

0 Kudos
2 Replies
RvdNieuwendijk
Leadership
Leadership
Jump to solution

You can try:

Get-Folder -Name Templates |
Get-Folder -Name Project1Teamplates |
Get-Template -Name Linux-OS-template 

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

That is it. Thanks!

0 Kudos