Monday, December 15, 2008

PrimalForms Example (Virtual Center Log)

Recently saw a post on Twitter from alanrenouf. He was asking if there was a log file that could be parsed to search for who deleted a VM. I know that this data was kept in the Virtual Center Database, specifically in the VPX_EVENT table. I mentioned this to Alan and he quickly wrote a PowerShell script to find the data and blogged it.
Concurrently, I was investigating PrimalForms (PowerShell UI builder - FREE). Once I saw Alan's post, I knew it would be a good example to try PrimalForms with.

The UI was simple to create with PrimalForms, here is a screenshot of the UI.

The dropdowns are filled on the form load with the following:
- Distinct Virtual Machine
- Distinct User
- Distinct Event (in Alan's case vim.event.VmRemovedEvent)
- Search Start Date
- Search End Date


Selecting the above variables generates the SQL statement to the VPX_EVENT table. The results are then passed to the datagrid.




Pretty cool!


As soon as I figure out how to attach a text file to Blogger, I will do so. In the short-term, if you are interested in the script(s), send me a note at stahler.2@osu.edu.

Enjoy!

3 comments:

Virtu-Al said...

That's amazing, nice work, a really good example of where to use a GUI behind powershell here.

Jeffery Hicks said...

I love it! How long did it take or how much time do you think PrimalForms saved you?

Where do you want to go next with it?

Anonymous said...

That is SWEET!
That is exactly the sort of tool that I was hoping people would develop (and share).

Good stuff - really good stuff!


Jeffrey Snover [MSFT]
Windows Management Partner Architect
Visit the Windows PowerShell Team blog at: http://blogs.msdn.com/PowerShell
Visit the Windows PowerShell ScriptCenter at: http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx