Scope of a function

  • In PowerShell, a function exists in a scope in which it was created.
  • If a function is in a script, it is only available to the statements within that script.
  • When a function is specified in the global scope, we can use it in other functions, scripts, and the command line.


Posted

in

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *