Issue With Daisy-Chaining Powershell Scripts RRS feed

  • Question

  • I'm having an issue with deploying a three-stage script deployment when deployed via SCCM. It works fine when I run the combination locally. The basic idea is that I have an opening UI that waits for the user to click "Okay", which then fires off the main script, and then when all is done the closing UI launches. The process works like this:

    %WinDir%\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -NonInteractive -File ".\Opening-UI.ps1"

    which calls

    %WinDir%\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -NonInteractive -File ".\MainApplication.ps1"

    which calls

    %WinDir%\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -NonInteractive -File ".\Closing-UI.ps1"

    When I run it via SCCM the closing UI never launches but all three fire off when run locally. Anyone have any ideas?

    Monday, September 30, 2019 5:03 PM

All replies

  • Are you reinventing the wheel, instead of using ?

    Have you evaluated, and rejected, using PSADT ?  If so, as in you found it lacking in some respect, you may want to ask in "General Discussion", the forum there for assistance.  or if there was something it's lacking, perhaps the devs can add a feature that you found is missing.

    Standardize. Simplify. Automate.

    Tuesday, October 1, 2019 5:31 PM