Variable scope

Variables may be declared in a number of different scopes. The scopes are:

  • Local
  • Global
  • Private
  • Script
  • A numeric scope relative to the current scope
More about scopes:
The help document, About_Scopes (Get-Help about_Scopes), has more examples and detail.

By default, variables are placed in Local scope. Access to variables is hierarchical: a child (scopes created beneath a parent) can access variables created by the parent (or ancestors).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.225.254.192