The suggested changes are necessary and in testing, they do not produce a DLL not found error.
Again, if you think PS is the be-all to end-all and line count is the best metric for judging software solutions, you are likely posting to the wrong form. This is not a PS forum. It is a forum for WinBatch users and the WIL scripting language.