Hi, I have a script below that simply loads a module then writes a line.
runme.ps1 contents:
Import-Module .\mymod.psm1
write-host "from runme.ps1"
mymod.psm1 contents:
exit
Running the script outputs:
from runme.ps1
This indicates that the exit in the module does not terminate the script, but exits the module load. Why? Isn't it supposed to exit the script?
Just for comparison, I've done the same in ruby and python. They both exit when exit() is called and output nothing.
And I just can't find any reference for the exit command so if you can send me links...