Powershell as .bat

As some Company has forbidden to use .ps1-files it comes handy to know how to implement the Powershell as an Batch/.bat-File:

Put your code in an Editor of your choice and replace all breaklines with a


and put your code as „one-liner“ behind this:

powershell -command

Powershell as .bat

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert.