Execute multiple cmd scripts simultaneously from one powershell script


hi all.

i'm writing small powershell script, last part of script fire 4 .bat scripts simultaneously, i'm having little trouble finding way. way i'm writing now, runs them sequentially (i have manually close each 1 fire next) :

if ($fileexists) {
cmd /c c:\temp\ps\bat001.bat $var001
cmd /c c:\temp\ps\bat001.bat $var002
cmd /c c:\temp\ps\bat001.bat $var003
cmd /c c:\temp\ps\bat001.bat $var004
}

use start instead of cmd.
rich prescott | infrastructure architect, windows engineer , powershell blogger | mcitp, mcts, mcp

engineering efficiency
@rich_prescott
windows system administration tool 2.0
ad user creation tool


Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Error: 0x80073701 when trying to add Print Services Role in Windows 2012 Standard

difference between wuauclt1.exe and wuauclt.exe

Windows 2016 RDS event 1306 Connection Broker Client failed to redirect the user... Error: NULL