VMware Cloud Community
kcvman
Contributor
Contributor

Script Ideas - Environment Dashboard

For all you scripting guru's looking for an ideas, I've got a doozy....

I picture a dashboard on my desktop, which features graphical representation from Powergadgets as well as text, telling me a "quick glance" (or administrtaive overview if you will) of the environment. The information would provide status and statistical information on clusters, hosts, guests, and datastores. Of course, all with a consistent update interval. Having this type of information runnig on the desktop during the workday would be invaluable. Future revisions could also include a Vista sidebar gadget.

Just an idea. I don't think that anyone makes something like this now (please correct me if I am wrong), but it would be worth the donations it would generate!

0 Kudos
6 Replies
halr9000
Commander
Commander

Check out PoshBoard (http://www.codeplex.com/Poshboard), that guy is doing some really neat stuff. It's still early code but looks amazing. Watch the videos the author posted to his blog (http://devinfra-us.blogspot.com/) as well.

Author of the upcoming book: Managing VMware Infrastructure with PowerShell

Co-Host, PowerScripting Podcast (http://powerscripting.net)

My signature used to be pretty, but then the forum software broked it. vExpert. Microsoft MVP (Windows PowerShell). Author, Podcaster, Speaker. I'm @halr9000
0 Kudos
Pilosite
Contributor
Contributor

hello,

Thanks halr9000 to spread the word about Poshboard Smiley Wink

I'm the developer of Poshboard and it does just what you talk about, kvcman :

With this portal, you can use any scripts / cmdlet / snapin to build a wide range of IT dashboard (charts, datagrids, text output, many more to come), on every technology that powershell / .NET can access (vmware, system center products, windows 2003/2008 and so on...). You can use PowerShell or vbscript or any other language that can be invoked by PowerShell.

The current version is still in development, but does provide reporting widgets and scripts execution without restriction (simply install the VMWare powershell snapin on the web server and start coding).

Poshboard is based on dropthings, a really cool open source project that use SQL to keep datas. It'll be easy to keep gathered data and provide a timeline for stastistics, that's a feature I plan to implement soon (it's already on the top five of my todo list)

Concerning Vista Gadgets, Its a feature I already looked at in the first stage of development. Since Vista Gadgets are build using HTML, this is perfectly possible to do an "export to vista gadget" function in the future... all is a question of time ! Smiley Happy

If you have question regarding PoshBoard and VMWare management, please ask me.

regards,

antoine

0 Kudos
jfierberg
Contributor
Contributor

Was the issue with connecting to the viserver resolved? Connect-viserver errors out when i run it on the poshboard. If I run my pshell commands in a ps1 file it kicks off.

0 Kudos
Peteski
Contributor
Contributor

Did you add the span-in for VMware? Add-PSSnapin VMware.VimAutomation.Core

If you don't add this it will error out because that cmdlet is not part of the base powershell library.

I was able to get regular asp.net+powershell html to kick out a page with a basic table off all of my Host and their VMs with virtual CPU count, RAM etc.

I was also able to get Poshboard to return a nice silverlight datagrid using the following powershell code:

Add-PSSnapin VMware.VimAutomation.Core

$c=connect-viserver -server myesxiserver -user readonly -password mypasswd

get-vm | format-grid -p Host,Name,MemoryMB,NumCPU,Powerstate

Just remember that where you want to run this code, you will need all of the things for poshboard plus the vmwaretools sdk installed to one computer.

I would suggest trying to run it first on your own PC using visual studio (express edition is free) debugging. That way when it throws an error visual studio will catch it and show the error code such as, "connect-viserver is not a known cmdlet or function" etc. Just open the .sln solution file for dropthings in visual studio and try it out.

Pete

0 Kudos
Pilosite
Contributor
Contributor

Hi,

"I would suggest trying to run it first on your own PC using visual studio (express edition is free) debugging. That way when it throws an error visual studio will catch it and show the error code such as, "connect-viserver is not a known cmdlet or function" etc. Just open the .sln solution file for dropthings in visual studio and try it out."

I just added PowerShell script error handling for all widgets in the last build of poshboard here

Now when your scripts output errors, it's shown in the widget container (more easy to debug)

hope this helps !

regards

antoine

0 Kudos
Butcha
Contributor
Contributor

Pete,

I am using this code to attempt a connection and query from poshboard 2.5 using VI toolkit cmdlets as follows:

"Add-PSSnapin VMware.VimAutomation.Core

Connect-VIServer -server "servername" -user "username" -password "password"

get-datacenter | out-host"

This has not worked for me at all. can you explain how u got your script to work? its not making sense to me because my code will run from a powershell console on the same webserver.

Especially your comment here: "Just remember that where you want to run this code, you will need all

of the things for poshboard plus the vmwaretools sdk installed to one

computer."

What are you actually speaking of when you say "vmwaretools sdk"?? The VI Toolkit? Power CLi?

0 Kudos