VMware's Get-Template cmdlet returns a list of templates in vSphere environment. I ran the command many times to get the list, but, they were continuously failed.
$ Get-Template NagiosTemplate
Get-Template : 2012-11-22 PM 3:23:05 Get-Template Template with name 'NagiosTemplate' was not found using the specified filter(s).
At line:1 char:13
+ Get-Template <<<< NagiosTemplate -Verbose
+ CategoryInfo : ObjectNotFound: (:) [Get-Template], VimException
+ FullyQualifiedErrorId : Core_OutputHelper_WriteNotFoundError,VMware.VimAutomation.ViCore.Cmdlets.Commands.GetTemplate
Or, It was the same with no template name and there was no result.
PS C:\> Get-Template
PS C:\>
I asked the question about this on VMware commnuity and I was recommended that connect to vCenter, not ESXi server. (Q&A link)
After I connected to vCenter again, this time, the command worked.
PS C:\> Get-Template
Name
-----------------------
NagiosTemplate
altibase templ 3
Altibase templ
Altibase templ 2
If you directly connect to ESXi host and run Get-Template cmdlet, you are not able to get anything. you must connect to vCenter server. Template management is not build-in feature of ESXi. This comes from vCenter Server.
댓글 없음:
댓글 쓰기