Executing Batch File Using PowerShell

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