Showing results for error handling - Scripting Blog [archived]

Mar 10, 2010
0
0

Hey, Scripting Guy! How Can I Use the Test-Path Cmdlet to Check for Resources?

ScriptingGuy1
ScriptingGuy1

  Hey, Scripting Guy! Ignoring errors or bubbling up errors to the user of a script seems a bit inefficient. I mean, wouldn’t it be better to avoid the errors in the first place? I am only a beginner when it comes to writing scripts, and maybe I just do not get it, but why can’t you just write code that does not generate errors?-- ...

Scripting Guy!Windows PowerShellscripting techniques
Mar 9, 2010
0
0

Hey, Scripting Guy! How Can I Use the –ErrorAction Preference Parameter?

ScriptingGuy1
ScriptingGuy1

  Hey, Scripting Guy! I enjoyed reading your blog post yesterday about using $ErrorActionPreference to control the behavior of a script. One thing I never liked about using “On Error Resume Next” from VBScript was that it seemed to be an all-or-nothing type of proposition. There are certain errors I do not need to see, but the...

Scripting Guy!Windows PowerShellscripting techniques
Mar 8, 2010
0
1

Hey, Scripting Guy! How Can I Use $ErrorActionPreference to Control Cmdlet Handling of Errors?

ScriptingGuy1
ScriptingGuy1

   Hey, Scripting Guy! One thing I liked about using VBScript is that I could add On Error Resume Next to the top of a script, and all my problems with the script went away. It was like magic, and I used it to fix many of my scripts. I really miss this capability in Windows PowerShell. -- MW Hello MW, Microsoft Scripting Guy Ed Wilso...

Scripting Guy!Windows PowerShellscripting techniques
Aug 25, 2005
0
0

Hey, Scripting Guy! How Can I Find All the Users with Remote Access Permissions?

ScriptingGuy1
ScriptingGuy1

      Hey, Scripting Guy! How can I find all the users with remote access permissions; that is, all those with the Dial-In or VPN property set to Allow? -- RC   Hey, RC. You know, it seems like people are always looking for something: true love, happiness, the meaning of life. We can’t help you wi...

Scripting Guy!error handling