Evening guys
I'm completely new with powershell, so I'd like a little bit of help. I'm trying to install several piece of software at the same time, for that I've written this script:
$msi = @('C:\Agent Files\Client\ccmsetup.exe', 'C:\Agent Files\setup.exe')
foreach($_ in $msi) {
Start-Process -FilePath $_ /qn -Wait
}
Issue is, that this is not waiting for the first .exe file finish and therefore launch at the same time the second one and then, second one crash!!!
Could anybody help me, please? I don't know if this is the best way to do it, so if someone has any idea or got any script where he is doing the same but in a different way and could let me know and explain me why, would be great.
Thanks.