Category Archives: Scripting

Try and Catch Me If You Can

In looking at entries in this year’s Scripting Games, as well as posts I see in PowerShell forums, I thought I’d post a short guide to properly using Try/Catch. This is the way I think it should be used. Let’s … Continue reading

Posted in PowerShell, Scripting | Tagged , , , | 7 Comments

Pipeline Power

Last week I came across a blog post that had a decent example using PowerShell and PowerCLI to get the disk location for all virtual machines. The posted code works and does display the information you might be after. $myVMs … Continue reading

Posted in PowerCLI, PowerShell, Scripting, VMware | Tagged , , , , | 4 Comments

Create an HTML PowerShell Help Page

Yesterday I posted an article about getting the online url for a cmdlet help topic. Today I want to demonstrate how we might take advantage of this piece of information. Since the link is already in the form of a … Continue reading

Posted in PowerShell, Scripting | Tagged , , , , , , , | Leave a comment

Get Cmdlet Help URL

I was toying around with PowerShell help this morning and as usually happens one thing leads to another. When you run Get-Help, or use the wrapper function Help, you are actually getting an object: MamlCommandHelpInfo. This object has properties that … Continue reading

Posted in PowerShell, Scripting | Tagged , , | 1 Comment

Have Your Output and Variable Too

There’s a relatively useful suggestion floating around on Twitter on how to save results of PowerShell command to a variable and see the results at the same time. PS C:\> ($data=get-process) I’ll admit this is a clever technique: you get … Continue reading

Posted in PowerShell, Scripting | Tagged , , | 5 Comments