In PowerShell, what is the difference between using dot (.
) and ampersand (&
) when invoking a cmdlet, function, script file, or operable program?>
Like Mathias mentioned as a comment in this thread. &
is used to invoke the expression whatever comes after the &
and .
is used to invoke it in the current scope and is normally used to dot source a helper file which contains functions to make it available in callers scope.