Running Mulitple Powershell Scripts

Welcome Forums General PowerShell Q&A Running Mulitple Powershell Scripts

This topic contains 4 replies, has 3 voices, and was last updated by

 
Participant
2 months, 3 weeks ago.

  • Author
    Posts
  • #108818

    Participant
    Points: 0
    Rank: Member

    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. ­čÖé

  • #108848

    Participant
    Points: 135
    Helping Hand
    Rank: Participant

    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?

    • #108994

      Participant
      Points: 0
      Rank: Member

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

  • #108938

    Participant
    Points: 1
    Rank: Member

    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.

     

    • #108997

      Participant
      Points: 0
      Rank: Member

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

You must be logged in to reply to this topic.