VMware Cloud Community
KnotzMe
Contributor
Contributor

Powercli VCD Snapshot Owner

Name says it all.....

Im pretty Powercli proficient, but i cant seem to lick this one.  Is there a way to Powercli a snapshot owner in VCD?

I can do it against vcenter via logs, but with VCloud the snapshot owner in vcenter will show as the service account and not the actual person who created the snapshot?  is there a way i can figure out the snapshot owner from vcd via powercli???

Thanks!!

Tags (3)
Reply
0 Kudos
3 Replies
KnotzMe
Contributor
Contributor

It might help to explain my main objective:

What I really want to find who created the snapshot so I can send out an automated email to them asking them to remove it.

I was going about trying to pull out the data via vcenter to find the snapshot owner, but all vcenter shows is the service account (of course).  So if theres any way to figure out who made that snapshot, im all ears.

Thanks again...

Reply
0 Kudos
liverson2020
Contributor
Contributor

Bump.......

EXACTLY what I came here looking for.  Something similar to get-vievent but for vCloud.  Ever find an answer?

Reply
0 Kudos
jfrmilner
Contributor
Contributor

Had the same issue, the best I came up with was to use PowerShell with the mssql module. Use Invoke-Sqlcmd cmdlet with a query like (Where VCDDB is your vCloud Director Database):

SELECT TOP 100 *

  FROM [VCDDB].[dbo].[audit_event]

  WHERE event_type = 'com/vmware/vcloud/event/task/complete' AND entity_name like '%SNAP%'

  ORDER BY internal_id DESC

Now once you have the results in an array you can continue on in PowerShell as you would if this was returned via PowerCLI.

.

Reply
0 Kudos