PowerTip: Find PowerShell Variables Defined for AllScope

Doctor Scripto

Summary: Find Windows PowerShell variables that are defined for all scopes.

Hey, Scripting Guy! Question How can I find  what variables are defined as AllScope in my Windows PowerShell environment?

Hey, Scripting Guy! Answer Get a list of all your variables, and filter for options that include AllScope, for example:

(dir variable:).where({$_.options -match 'allscope'})


Discussion is closed.

Feedback usabilla icon