k blog.kenaro.com
← All articles

PowerShell on Linux / Debian 11 - 'exit' command not working as expected

· Ingo Karstein

On my Debian 11 VM, the ‘exit’ command in a PowerShell script does not work as expected.

The script stops working, but the process does not exit either.

Now I use this to exit immediately.

[System.Environment]::Exit(0)

0 comments

Leave a comment

Your comment is reviewed before it appears. Your name is shown with the comment; your email is required for moderation but never published.