This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Stop execution if script is not explicitely invoked | |
if ($MyInvocation.InvocationName -ne $PSCommandPath){ | |
return | |
} | |
# Execute only if script is explicitely invoked | |
if ($MyInvocation.InvocationName -eq $PSCommandPath){ | |
Write-Output "Script was called by powershell.exe" | |
} |