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

Disconnecting from a Windows Server 2012 R2 file sharing session on a Windows 7,8,10 machine

Event ID 64,77,1008 Certificates Events Windows Server 2008, 2008R2