Good day, would like to create a master powershell script running multiple ps1.
deployscript1.ps1 (user will be prompted with yes or no) if yes then run the script then proceed on next step(deployscript2.ps1), if no then run deployscript2.ps1(but user will be prompted again with yes or no) if yes then run and if no then to proceed to next deployment (scriptdeployscript3.ps1) and so on.
Can someone help me on this. Thank you in advance. 🙂
Is that a question? If yes – what kind of help do you need? We do not write scripts on request here. We try to answer scripting questions or try to solve problems you have with a particular piece of code you wrote.
Did you try to find an already prewritten script in the Powershell Gallery or in the Microsoft Technet Gallery?
Sounds too complicated. Make your life easier by creating scripts or functions that accomplishes one task and only one task. For example, if you want to create a script that gets a user from a db (AD for example) and then change the password don't create the one script. Create one that gets the user (Get-User) and then create another for the password (Set-User). This way you can use these functions independently or with other functions or scripts.
Learn PowerShell scripting in a month of lunches is a great resource for this. Specifically chapter 3.