When you dot source a script, all variables and functions defined in the script will persist in the shell when the script ends.
Syntax
. filename [arguments]
Key
filename The path and filename of the script to run.
arguments Any arguments for the script.
Example
PS C:\> . C:\scripts\myscript.ps1
PS C:\> . ./script64.ps1
#If dogs run free, why not me, Across the swamp of time?, My mind weaves a symphony, And tapestry of rhyme# ~ Bob Dylan
Related:
& (call) - Run a command script
PowerShell Operators - Syntax
Run a PowerShell script - Syntax
Invoke-Item - Invoke an executable or open a file
© Copyright SS64.com 1999-2013
Some rights reserved