Tuesday, September 29, 2009

Shiny Heartgold Pokemon

OneLiner 1: Virtual Machines running on a Cluster


sure I'm not the only manager to VMware at some point has been a partner with one of the most innocent questions that we can do:
    "How many and what virtual machines are running on the cluster? "
  • . As you can guess, the task is not to be particularly complicated, but if the number of the above is high, a simple task, we turn to a tedious task. Precisely this has been the question I have done today ... so I decided to pull powershell, or to be more accurate PowerCLI
, and make not a script (which seemed too cumbersome for a simple list) but a oneline
(ie, a script that deals one line). Well, here I leave a oneliner that is responsible for obtaining the list of all virtual machines running on a particular cluster:
    (Get-View $ (Get-Cluster cluster
  • ). Id). Host that are running under the control of your virtual center, the oneliner would:

(Get-VMHost any tool that fully satisfies my needs, so I pulled scripting (masters, what I do when I find a tool that meets my needs). The result of those hours of programming has been mDiff
, a small script that takes as POSH single input parameter, a list of files or directories to compare (platform independent they are in the local disk or published in a shared folder ) and calculates the MD5 signature of each of the elements to compare, presenting a report in HTML with the result of the comparisons. The script you can download as usual from my dropbox: http://dl.getdropbox.com/u/1039818/Blog/Windows/mdiff.ps1 To run you will need the v2 POSH )

0 comments:

Post a Comment