3 Replies Latest reply on Jun 14, 2016 7:24 AM by jfrmilner

    Powercli VCD Snapshot Owner

    KnotzMe Lurker

      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???



        • 1. Re: Powercli VCD Snapshot Owner
          KnotzMe Lurker

          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...

          • 2. Re: Powercli VCD Snapshot Owner
            liverson2020 Lurker



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

            • 3. Re: Powercli VCD Snapshot Owner
              jfrmilner Lurker

              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.