In vSphere there is a Notes section on the summary page of the vApp is there any way to access this using PowerCLI. I know you are able to get it from individual VMs but I have not found a way to accomplish this at the vApp level. Below is the way to get it from an individual VM.
$VMNotes = Get-VM "VMName" | Select-Object -ExpandProperty Notes
Note: If I change Get-VM to Get-VApp I get a "Select-Object : Property "Notes" cannot be found" error
If you just want to print the Notes to the screen, you could do
$vAppName = "NameOfVApp"
$vApp = Get-VApp -Name $vAppName
Write-Host "Note: $($vApp.ExtensionData.VAppConfig.Annotation)"
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Try like this
Get-VApp |
Select Name,@{N='Notes';E={$_.ExtensionData.VAppConfig.Annotation}}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
While I don't get an error nothing is printed. I am very new to PowerCLI, this is what I have with nothing printing. I tried the suggested as well as what I have attached. Not sure if this is what you meant.
$vAppName = "NameOfVApp"
$VMNotes = Get-VApp | Select $vAppName,@{N='Notes';E={$_.ExtensionData.VAppConfig.Annotation}}
Write-Host "Note: $($VMNotes)"
If you just want to print the Notes to the screen, you could do
$vAppName = "NameOfVApp"
$vApp = Get-VApp -Name $vAppName
Write-Host "Note: $($vApp.ExtensionData.VAppConfig.Annotation)"
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference