script termination from module: exit vs. break


hi, have script below loads module writes line.

runme.ps1 contents:

import-module .\mymod.psm1
write-host "from runme.ps1"

mymod.psm1 contents:

exit

running script outputs:

from runme.ps1

this indicates exit in module not terminate script, exits module load.  why?  isn't supposed exit script?

just comparison, i've done same in ruby , python.  both exit when exit() called , output nothing.

and can't find reference exit command if can send me links...

importing module not execute module.  loads memory.


\_(ツ)_/



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Error: 0x80073701 when trying to add Print Services Role in Windows 2012 Standard

Disconnecting from a Windows Server 2012 R2 file sharing session on a Windows 7,8,10 machine

Windows 2016 RDS event 1306 Connection Broker Client failed to redirect the user... Error: NULL