PowerShell Studio 2014: Verify Script

We offered a mechanism on how to import a remote machine’s Module profile as mentioned here and here. The import can be extremely useful when you need to work on a script that runs on a remote server.

PowerShell Studio 2014 introduces a new feature that lets you verify that your script will run on the remote machine by comparing the cmdlets and modules used in the script with those available on the remote machine. The Verify Script command will then produce a report listing all the missing modules and cmdlets on the selected machine.

Verifying your Scripts:

Start by selecting the appropriate machine from the Platform section in the Ribbon’s Home tab:

image

If you wish to select a remote machine, you will need to import the remote machine’s cache beforehand.

Next go to the Ribbon’s Tools Tab and press the Verify Script button:

image

PowerShell Studio will then evaluate the script and display the results in the Output panel:

image

Tip
PowerShell Studio’s editor offers a visual cue as to when a cmdlet is unknown:

image

As demonstrated, Verify Script offers a quick and simple way to verify that your script is capable of running on a remote machine.  Even though PowerShell Studio identifies unknown commands as you type, the Verify Script makes it easier for you to determine the necessary modules for the script to run.