PowerShell: Use the PowerShell Integrated Scripting Environment (ISE) GUI

Those of us who are old enough started working with computers from a scripting interface (BASIC) or via green screen.  You old geezers with punch cards probably find PowerShell really easy.  Those who have grown up using the Windows GUI must find PowerShell totally alien – searching for help  and configuring a machine from a command prompt.

You can make things a little easier using ISE, the Integrate Scripting Environment.  You can add this Windows feature (a subset of Windows PowerShell in Windows 8) to make scripting and configuring a little easier.

The Commands pane allows you to find cmdlets in any or all modules.  Select it, hit Insert and it goes into a PowerShell pane (bottom-left).  Or you can Copy the cmdlet, and paste it into the script pane (middle).


In my previous posts I’ve talked about using help and get-member to figure out what a cmdlet can do.  With ISE, you have Intellisense.  In my example, I’ve used Insert to put the Get-NetAdapter cmdlet into the PowerShell pane.  Then I typed the hyphen and Intellisense kicked in, presenting everything that was valid from that point onwards. 

If you don’t know the cmdlets you’re working with, this is a nice way to figure out things in an environment that can be a little more helpful.

If you run the cmdlet in the bottom-left scripting pane, then the results appear in the top-left pane.  If you write a script in the middle pane and hit the green run arrow that appears in the menu bar, then you see the results in that top-right pane as well.  That keeps the whole environment nice and clean, and allows you to modify things quickly without jumping from window to window.

Technorati Tags: ,,

PowerShell: Get More Information On Your CmdLets

With the PowerShell Window, you can run Help or Get-Help to go looking for information of syntax and flags.  If you want, you can even use the get-member cmdlet, such as:

Get-NetAdapter | Get-Member

There’s two things that are happening with the above command.  Get-NetAdapter is being run, and then we’re using a pipe to send the output as an input to Get-Member.  Get-Member will list all of the attributes of the Get-NetAdapter output, including methods and properties.  You might want to filter that down, and you can do that by running:

Get-NetAdapter | Get-Member –MemberType Property

Where did I get –MemberType from?  Look at the titles of the columns from the previous command.  One of them was called MemberType.

I could have just as easily used:

Get-NetAdapter | Get-Member –Name *Interface*

That would have limited the results to attributes of Get-NetAdapter that contained “Interface” in their name.

Technorati Tags: ,