PowerTip: Find PowerShell Variables in Various Scopes

Doctor Scripto

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


Discussion is closed.

Feedback usabilla icon