PowerTip: Find PowerShell Variables in Various Scopes

PowerTip: Find PowerShell Variables in Various Scopes

  • Comments 1
  • Likes

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

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment