July 9th, 2014

PowerTip: Find Information About ErrorActionPreference

Doctor Scripto
Scripter

Summary: Find information, beyond the basics, for the Windows PowerShell variable ErrorActionPreference.

Hey, Scripting Guy! Question How can I use Windows PowerShell to see information, beyond only the value, for the variable ErrorActionPreference?

Hey, Scripting Guy! Answer Use the Get-Variable cmdlet and pipe the results to the Format-List cmdlet:

Get-Variable ErrorActionPreference | Format-List *

Note  When you use the *variable cmdlets, you do not specify the initial dollar sign.
So it is represented as ErrorActionPreference not $ErrorActionPreference.

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.