Dot-sourcing code

Dot-sourcing code means executing an entire script file and bringing whatever function, variable, and other definitions into your current scope, which usually is the global scope, as seen in the previous code sample. This also means that by using dot-sourcing, you run the risk of overwriting your own variables, functions, cmdlets, and so on:

# Dot-sourcing in action. The space is not a typo
. .MyScript.ps1
..................Content has been hidden....................

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