July 6th, 2014

PowerTip: Find PowerShell Variables in Various Scopes

Doctor Scripto
Scripter

Summary: Learn how to find Windows PowerShell variables in various scopes.

Hey, Scripting Guy! Question How can I see what Windows PowerShell variables exist in various scopes?

Hey, Scripting Guy! Answer Use the Get-Variable cmdlet and use the –Scope modifier (this can be globallocal, or script), for example:

Get-Variable -Scope global

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.