About 118,000 results
Open links in new tab
  1. about_Scopes - PowerShell | Microsoft Learn

    Feb 2, 2025 · To find the variables that are visible in a particular scope, use the Scope parameter of Get-Variable. The visible variables include global variables, variables in the parent scope, …

  2. scope - Variable scoping in PowerShell - Stack Overflow

    Feb 17, 2012 · You can explicitly scope varibles when you update them, or you can use [ref] objects to do your updates, or write your script so that you're updating a property of an object …

  3. PowerShell Scopes: Understanding Variable Scope - ATA Learning

    In this article, you’re going to get a deep lesson in what scopes in PowerShell are, how they work, and how you can write code with scopes in mind. By the time you’re done, you’ll understand …

  4. Scopes - PowerShell - SS64.com

    You can place variables, aliases, functions, or PowerShell drives in one or more scopes. An item that you created within a scope can be changed only in the scope in which it was created, …

  5. PowerShell Variable Scope Guide: Using Scope in Scripts

    Dec 4, 2025 · Dive into our PowerShell Variable Scope Guide to optimize your scripting process. We've simplified variable scope in PowerShell for you!

  6. Scopes | PowerShell By Example

    When you create a variable, alias or a function in PowerShell, it is only available in the current scope where it was created. For example, when you create a variable in a function, it is only …

  7. PowerShell — Understanding Scope - by Rod Trent - myITforum

    May 15, 2025 · When PowerShell encounters a variable or command, it first checks the local scope, then the script scope, and finally the global scope. If the variable is not found in any of …

  8. Enhancing Your PowerShell Skills with Scope Management

    Mar 3, 2025 · In this post, I will cover the basics of PowerShell variable scope and provide examples of how to use scoping in PowerShell scripts and modules. What are scopes? …

  9. The PowerShell variable scope - 4sysops

    Mar 13, 2015 · Its purpose is to restrict read and write access from different locations in a PowerShell session. Note that the scope is also relevant for aliases, functions, and PowerShell …

  10. Scoping variables with PowerShell - Online course

    Mar 10, 2025 · In this chapter, we'll look at the scope of PowerShell variables, because in addition to having a type, variables also have a scope, meaning that they can only be accessed in …