VMware Cloud Community
jingleharish
Contributor
Contributor
Jump to solution

VM Move details

We have different teams managing the VM's in the infrastructure. I want to know how to get the details of the VM movement in the VM & templates view of VI client through PowerCLI, report should look something like below.

VMname

From_Folder

To_Folder

Date_Time

UserName

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Afaik that information is only partialy available in the vCenter Task and Events log.

See also the Task and Events tab in the vSphere Client.

You can get the timestamp, the user and the destination, but the other info is not present

Get-VIEvent -MaxSamples 500 |
where {$_.GetType().Name -eq "TaskEvent" -and $_.Info.Name -eq "MoveIntoFolder_Task"} |
select CreatedTime,UserName,@{N="Destination";E={$_.Info.EntityName}} 

You can change the MaxSamples value if you want to go back further in time.


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

View solution in original post

0 Kudos
1 Reply
LucD
Leadership
Leadership
Jump to solution

Afaik that information is only partialy available in the vCenter Task and Events log.

See also the Task and Events tab in the vSphere Client.

You can get the timestamp, the user and the destination, but the other info is not present

Get-VIEvent -MaxSamples 500 |
where {$_.GetType().Name -eq "TaskEvent" -and $_.Info.Name -eq "MoveIntoFolder_Task"} |
select CreatedTime,UserName,@{N="Destination";E={$_.Info.EntityName}} 

You can change the MaxSamples value if you want to go back further in time.


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

0 Kudos