I would say it depends on what you want to do.
But it depends on which context you’re in.
Break and return will produce the same result if you’re in the same scope.
E.g. lets say you have a script and not using functions in the script both return and break will stop executing the script.
If you are executing some code in a function in that script.
Return will exit the function but will continue with the script.
Break will stop execution of the rest of the script.
Exit will exit the script and close the console.
In regard to Exit it depends on what you want to achieve afterwards.
Exit 0 will return the exit/errorcode of 0.
Exit ‘any none zero’ value will produce the exit/errorcode of 1.
So if you want more granular error codes than 0 or 1.
Use: [System.Environment]::Exit(any_number) or $host.SetShouldExit(any_number).
Haven’t explored ways to capture the error code other than running the script from a normal command prompt.
Since the console will exit once it hits one of the exit variants.
But I’m sure you can do it somehow, maybe launching the script in a new powershell session might work.
Haven’t tested it though.