Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Check What PowerShell Does When Error Occurs

$
0
0

Summary: See what Windows PowerShell will do when an error occurs.

Hey, Scripting Guy! Question How can I check the setting so I will know what Windows PowerShell will do if an error occurs?

Hey, Scripting Guy! Answer Look for the value of the $ErrorActionPreference. By default, it is set to Continue, which means it will
           attempt to execute the next command. Other values are StopInquire, and Ignore.
           Here is an example of the command:

PS C:\> $ErrorActionPreference
Continue


Viewing all articles
Browse latest Browse all 3333

Trending Articles