Is it possible to get the Name in vSphere for vapp template vms in vcloud director.
I can get the name mentioned in vcenter for CI VM using below cmdlets
$vm=Get-CIVM
Get-View –RelatedObject $vm
but not able to get for vapp template vms.
Here is the script I am missing the full name in vcenter for a vapp template.
foreach($org in Get-Org |Sort-Object -Property Name){
foreach($catlog in ($org|Get-Catalog | Sort-Object -Property Name)){
foreach($VAppTemplate in ($catlog |Get-CIVAppTemplate | Sort-Object -Property Name)){
foreach($CIVMTemplate in ($VAppTemplate |Get-CIVMTemplate | Sort-Object -Property Name)){
"" |Select-Object @{N="Org Name";E={$catlog.Org}},
@{N="Catlog Name";E={$catlog.Name}},
@{N="Catlog Owner";E={$catlog.Owner}},
@{N="VAppTemplate Name";E={$VAppTemplate.Name}},
@{N="VAppTemplate Owner";E={$VAppTemplate.Owner}},
@{N="VMTemplate Name";E={$CIVMTemplate.Name}}
}
}
}
}
Did you try passing it to Get-CIView first?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Did you already try changing
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
It worked for me I can able to get the output
but I am trying to get the name which is given in vcenter for vapp template.
why this cmdlet is not working for vapp template objects?
same is working for virtualmachine objects
Did you try passing it to Get-CIView first?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks its working after passing Get-CIview.
I have the same issue but i am a bit confused could you provide the complete code. When you say pass get-ciview do i pass it to get -view -relatedobject ?
Because that does not work
Could you elaborate on this, I have tried a few different ways but I cant get it to work.