VMware Cloud Community
DJ_dshivamu
Enthusiast
Enthusiast
Jump to solution

Snapshot report not showing VM name

hello

I am issuing following command to list out snapshot value but i am not getting VM name instead i am getting VMware.Vim.VmEventArgument, could you please help me

$vm=get-content c:\vms.txt

PowerCLI C:\> $vm | ForEach-Object { get-vievent $_.vm} |  where { $_.fullFormattedMessage -like "Task: Remove snapshot" } | select createdTime,fullFormattedMessage

14/06/2015 22:14:06    Task: Remove snapshot  VMware.Vim.VmEventArgu...
13/06/2015 22:15:45    Task: Remove snapshot  VMware.Vim.VmEventArgu...
12/06/2015 22:18:43    Task: Remove snapshot  VMware.Vim.VmEventArgu...
11/06/2015 22:18:53    Task: Remove snapshot  VMware.Vim.VmEventArgu...
11/06/2015 01:05:24    Task: Remove snapshot  VMware.Vim.VmEventArgu...
09/06/2015 22:12:33    Task: Remove snapshot  VMware.Vim.VmEventArgu...
09/06/2015 21:58:30    Task: Remove snapshot  VMware.Vim.VmEventArgu...
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

To get the VM name you can use the following calculated property (on the TaskEvent).

@{N="VM";E={$_.Vm.Name}}

See also  3.  Re: snapshot who created it


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

View solution in original post

0 Kudos
2 Replies
LucD
Leadership
Leadership
Jump to solution

To get the VM name you can use the following calculated property (on the TaskEvent).

@{N="VM";E={$_.Vm.Name}}

See also  3.  Re: snapshot who created it


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

0 Kudos
DJ_dshivamu
Enthusiast
Enthusiast
Jump to solution

Thanks Lucd i found it before your reply but thanks for your help 🙂

0 Kudos