Welcome › Forums › General PowerShell Q&A › Executing Batch File Using PowerShell
This topic contains 2 replies, has 2 voices, and was last updated by
Hi There- Need help to execute cmd file (batch file) from PowerShell script. Please let me know if anyone did this. Thank You, Dilip
You can execute .cmd or .bat files the same way you execute any other external program. For example:
c:\script.cmd Arg1 "Arg 2"
Thank you Dave. Just now I tried below and it worked.
Start-Process -FilePath "C:\PSDemo\CopyFile.bat" "C:\Source" "C:\Destination" -WindowStyle Hidden
The topic ‘Executing Batch File Using PowerShell’ is closed to new replies.