How to run powershell command in batch file

Question:


when i save as .bat file and run it does not working otherwise it is working properly in powershell when i entering manually..

Answer:

Enclose your PowerShell code in,


Remember to separate all statements with ; and to enclose your " with a quoted string, i.e by using ""

Source:

How to run powershell command in batch file by licensed under CC BY-SA | With most appropriate answer!

Leave a Reply