Summary : Learn how to simplify your Windows PowerShell Script by using parameter validation attribute. Weekend Scripter Microsoft Scripting Guy, Ed Wilson, is here. I thought I would ask Glenn Sizemore to write today’s blog about parameter validation...
Posted to
Hey, Scripting Guy! Blog
by
Hey, Scripting Guy! Blog : Windows PowerShell
on
05-15-2011
Filed under:
Filed under: Scripting Guy!, Windows PowerShell, scripting techniques, Weekend Scripter, error handling, guest blogger, 2011 Scripting Games, writing, wrap up
Summary : Learn how to use error handling in your Windows PowerShell scripts. Microsoft Scripting Guy, Ed Wilson, is here. Guest Blogger Week continues with Bhargav Shukla. Bhargav Shukla is a senior premier field engineer—unified communications...
Summary : The winner of the beginner division of the 2011 Scripting Games shares his thoughts and insights. Weekend Scripter Microsoft Scripting Guy, Ed Wilson, is here. This week we will have a combination of guest bloggers and me with a recap of the...
Summary: Learn how to handle errors in Windows PowerShell and how to export user information from Microsoft Active Directory to a CSV file. In this post: Exporting Active Directory Users to CSV Adding Comments to a Script File Error Handling in Windows...
Summary : Use Windows PowerShell to Query Active Directory for computers and then run WMI commands on the remote machines. The Scripting Guys show you how. Hey, Scripting Guy! We have a major problem at my company. We have a standard corporate...
Summary : Query Active Directory and ping each computer in the domain by using Windows PowerShell. The Scripting Guys show you how. Hey, Scripting Guy! I am THE IT person at my company. I am also a chemical engineer who has daily production responsibilities...
Hey, Scripting Guy! I need to use Windows PowerShell to retrieve information about my computer hardware. Specifically I am interested in the make, the model, and the speed of my CPU by using a script. Can this be done? -- DH Hello DH, Microsoft Scripting...
I’ve been working with PowerShell’s error handling – trying to get a better handle on it. Yesterday, I looked at general error handling and discussed how to trap or catch an exception. By handling errors in your scripts, you make the script more production...
At last week’s UK PowerShell User Group meeting, Jeremy gave a talk on Error handling. It got me thinking about the whole business of errors and error handling in PowerShell. One of the great differences between casual and production scripts is the need...
# Requires -Version 2 # Show-TryCatchFinally.ps1 # Demonstrates try/catch/finally in V2 # First, try something that will work Try { $I = 1 } Catch { " Caught a problem in try 1 " } Finally { " All done with 1st try " } # Now try something that fails $one = 1 # $zero=0 Try { $one ...