Scripting Blog [archived]

Formerly known as the "Hey, Scripting Guy!" blog

Hey, Scripting Guy! How Can I Test the Efficacy of My Script Modifications?

 (image) Hey Scripting Guy! I have a script that I wrote, and I am interested in modifying it to try and make it run faster. I know I can use the Measure-Object Windows PowerShell cmdlet, but I want to run the script several times and get the average time it takes for each script to run. This task sounds like it might be a bit more ...

Hey, Scripting Guy! How Can I Speed Up My Windows PowerShell Scripts?

 (image) Hey Scripting Guy! I am not sure why you are so excited about Windows PowerShell. It is much slower than VBScript. I am not talking about a little slow; I am talking about orders of magnitude slower. Sure it has some nice cmdlets, but the performance is sucking fumes. -- LM(image) Hello LM, It is no secret that Windows ...

Hey, Scripting Guy! How Can I Test a Bunch of Scripts and Generate a Report?

 (image) Hey Scripting Guy! At our company, we have a lot of Windows PowerShell scripts we use to gather information from various client computers distributed throughout the network. All of these scripts are in a single folder. Recently, several users have been reporting that these scripts are causing them problems, and they have been ...

Hey, Scripting Guy! How Can I Handle Errors in a Windows PowerShell Script?

 (image) Hey Scripting Guy! When I used to write VBScripts, I liked the fact that I could use On Error Resume Next to handle any errors in my scripts. I have tried to find something like this in Windows PowerShell, but I have been unable to do so. Does Windows PowerShell have On Error Resume Next? -- OG (image) Hello OG, When I am ...