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... |
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
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
Thanks Lucd i found it before your reply but thanks for your help 🙂