Search notes:

PowerShell: dot sourcing operator

The dot sourcing operator (.) runs a script in the current scope.
Thus, code that executed with the dot sourcing operator can add, delete or modify functions, aliases, variables etc.
This is in contrast to the call operator (&) that executes code in child scope so that the current scope remains unchaged.

Syntax

The dot of the operator is separated by one or more whitespaces from the absolute or relative path of the script to run:
. p:\ath\to\script.ps1
. .\script.ps1
Note: In . .\script.ps1, the first dot is the operator, the second dot is part of the relative path and indicates the current directory.

See also

operators

Index