I have 3 script files file1.ps1,file2.ps1,file3.ps1 to be run one after one but only if the precedence script succeeded succesfully
how can i do that, i want to wrap the 3 filoe script in one operation.
thanks in advance
Agreed. It'd be far better to build the sub-scripts into functions, which your "main" script can then call. Functions can return errors (Write-Error or Throw), which the main script could trap. Functions could also just return a good/bad return value, so the mains cript would know.