I have a PS script - PScript and several files that need to be processed - Text1, Text2, and Text3. What I would like to do is run multiple instances of the same script - one for each of the text files. Is it as simple as doing something like this?
powershell Pscript Text1 & powershell Pscript Text2 & powershell Pscript Text3
Thanks!
Running multiple instances of the same script
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
- Interstellar
- Posts: 6
- Last visit: Wed Dec 21, 2016 9:28 am
Re: Running multiple instances of the same script
You will find that that doesn't work.
You will have to use a separate line to run each script or use jobs. The jobs will need to take an argument that specifies the file to process.
You will have to use a separate line to run each script or use jobs. The jobs will need to take an argument that specifies the file to process.
- Interstellar
- Posts: 6
- Last visit: Wed Dec 21, 2016 9:28 am
Re: Running multiple instances of the same script
Thank you for pointing me in the right direction. I'm reading up about jobs now.
jvierra wrote:You will find that that doesn't work.
You will have to use a separate line to run each script or use jobs. The jobs will need to take an argument that specifies the file to process.