Author Posts

August 17, 2018 at 9:34 am

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. 🙂

August 17, 2018 at 11:56 am

Can someone help me on this.

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?

August 19, 2018 at 1:00 pm

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.

 

August 20, 2018 at 7:34 am

Olaf Soyk  Thank you for the info(1st time here :)! I'm already able to create the script.

August 20, 2018 at 7:36 am

@alex Thank you for the reply and tips! Really appreciate it!!!