A while back, I added this post with some PowerCLI one-liners to turn on and off SSH across a whole cluster. I got irritated with always having to browse out here and copy the script, so I created a reusable tool with a GUI to do this little task!
The VirtAdmin SSH Tool for vSphere Clusters
The tool uses Powershell to draw Windows forms. I generated the GUI using Sapien Technologies’ PrimalForms CE. The tool did most of the leg work for me. Once the form was generated, I just added the logic and made the buttons do things! Let me explain a few details…
The first time you perform an action (Turn On or Turn Off), you will be prompted for credentials to connect to vCenter with. These credentials are preserved until the window is closed because they’re a variable in the Powershell environment. Because they’re a part of the session however, they won’t persist after the window is closed. I did this for obvious security reasons.
If there’s a feature you’d like to see added to this tool, let me know! I’d be interested in adding more functionality. This was mostly a test run to get familiar with the PrimalForms tool before I embark on a much larger, much more useful project. Details to come! 🙂
Download the PS1 file HERE
Side note: I learned about the PrimalForms tool from a much much cooler project done by Eric Shanks (@eric_shanks) over at The IT Hollow. He created a tool that can be distributed to end users (like developers) that will allow them control over VMs that they own without having to give them access to vCenter itself. Check out his blog post on this awesome tool HERE!