- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I have some commands to check the VMs that has the snapshot name:
$VMlist = get-vm
Get-Snapshot -VM $VMlist | where{$_.Description -eq 'Prior to install VMTools'}
But the output is displaying like this. Is there anyway I can see the VM names in the result?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You could use nested Where-clauses.
Get-VM |
Where-Object{Get-SNapshot -VM $_ | Where-Object{$_.Description -eq 'Prior to install VMTools'}} |
Select-Object -Property Name
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The returned Snapshot object contains a property Created, which you can add on the Select-Object cmdlet.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you