Highlighted
Enthusiast
Enthusiast

Notes property of a VM in Get-View

Jump to solution

Snag_1505bfd8.png

Is there any property in Get-View that can retrieve the notes of a VM?

@{N='Notes';E={(Get-VM $_.Name).Notes}} consumes a lot of time, when run against several VMs. I prefer to use Get-View $vm over Get-VM.

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
Highlighted
User Moderator
User Moderator

Try like this

Get-View -ViewType VirtualMachine |

Select Name,

    @{N='Notes';E={$_.Config.Annotation}}


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

View solution in original post

0 Kudos
1 Reply
Highlighted
User Moderator
User Moderator

Try like this

Get-View -ViewType VirtualMachine |

Select Name,

    @{N='Notes';E={$_.Config.Annotation}}


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

View solution in original post

0 Kudos