Reputation: 23
Is there a way to create a script that runs multi scripts? Also the first script should finish before next script is allowed to start.
Example:
.\script1.ps1 arg1
#wait until script1 is done
.\script2.ps1 arg1 arg2
#wait until script2 is done
.\script3.ps1 arg1 arg2
Upvotes: 2
Views: 297
Reputation: 4261
the example you gave is a valid script, just put it in a script file and run it.
Upvotes: 3
Reputation: 72630
just try :
.\script1.ps1 arg1;.\script2.ps1 arg1 arg2;.\script3.ps1 arg1 arg2
Upvotes: 3