Compiling PowerShell script to exe

Intro I’ve been asked the question on “How can I turn my script to an exe-file” more times than I can remember. My answer has always been: -“Just host Windows PowerShell in an executable and run what ever code you like.” Scared of using C# most people has ignored my advice and used some kind of tool to do this, and there is no fault in that (as long as you choose a tool from a provider you trust, not a random tool from a shade site on the Internet).