PowerTip: Find PowerShell Variables in Various Scopes


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

Comments (1)