PowerShell and Goverlan (Part 1) – Generating Scripts

PowerShell and Goverlan 1 of 4- Generating Scripts with WMIX

You can do a lot of really awesome things with Goverlan and a bit of PowerShell. This blog post series will take you through some of the PowerShell support that Goverlan offers.

Goverlan PowerShell support includes:

  • Generating scripts from any WMI class/instance (part 1, this post)
  • Securely deploying scripts against remote machines (part 2)
  • Organizing/saving all of your scripts in the Goverlan Object Manager (part 3)
  • Use the Goverlan target/scheduling/automation engines to deploy scripts (part 4)

Sounds simple enough, right? We will start with script generation.

Generating PowerShell scripts with Goverlan

Generating scripts with Goverlan is done through WMIX. WMIX is a free GUI-based WMI exploring/script generating tool. You can generate a PowerShell (or VB) script off of any WMI class/object using Goverlan WMIX and it is super-simple to do!

  1. Start with downloading WMIX (it is free, for everyone, EVEN YOU!)
  2. Next, run the install and launch the application.

Because WMIX explores the WMI repository it is totally AGENT-FREE (agentless). There are no agents to push or maintain, none, zero. Just hit that connect button in the top corner and enter a machine name or IP address.

You can also add favorites for quick and easier future access. Favorites can be added as individual machines, static containers, AD containers, or IP ranges.

Once you connect to a machine, the fun begins!

The WMI repository is not the friendliest place for even more experienced SysAdmins. WMIX takes the complication out of exploring WMI by adding a nice GUI and human-friendly names.

Navigate through the repository on the machine you are connected to and explore a bit. We will go through one simple example in this post, but check back for more complex guides/examples.

Example: Querying remote machines

It is really easy to query information about a remote machine using WMIX. The entire WMI repository is exposed, you drill through the repository using our GUI until you find what you are looking for. There is a built in search option as well.

A quick query might be Computer System Identity. Just navigate to that instance, right click, and choose Export Query as a Script.

Export query as a powershell script
Export query as a PowerShell script

The script will open in the PowerShell ISE by default.

Make sure to check back  for the next post and see how we can securely deploy this script using Goverlan!

Leave a Reply