PowerShell on Linux / Debian 11 – ‘exit’ command not working as expected

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)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.