<p>Imagine a DOS style .cmd file which is used to launch interdependent windowed applications in the right order.</p>

<p>Example:<br>
1) Launch a server application by calling an exe with parameters.<br>
2) Wait for the server to become initialized (or a fixed amount of time).<br>
3) Launch client application by calling an exe with parameters.</p>

<p>What is the simplest way of accomplishing this kind of batch job in PowerShell?</p>

To wait 10 seconds between launching the applications, try
```
```
launch-server-application serverparam1 serverparam2 ...
Start-Sleep -s 10
launch-client-application clientparam1 clientparam2 clientparam3 ...
```
```
If you want to create a script and have the arguments passed in, create a file called runlinkedapps.ps1 (or whatever) with these contents:
```
```
launch-server-application $args[0] $args[1]
Start-Sleep -s 10
launch-client-application $args[2] $args[3] $args[4]
```
```
Or however you choose to distribute the server and client parameters on the line you use to run runlinkedapps.ps1. If you want, you could even pass in the delay here, instead of hardcoding
```
10
```
.
Remember, your .ps1 file need to be on your Path, or you'll have to specify its location when you run it. (Oh, and I've assumed that launch-server-application and launch-client-application are on your Path - if not, you'll need to specify the full path to them as well.)