locked
Powershell script stops after 3-4 minutes during Task sequence RRS feed

  • Question

  • We have a Powershell script running near the end of our task sequence which does a couple of checks (Office package, bitlocker, company apps, etc.)

    Problem is, the script responsible for it all starts without issues, however after 3-4 minutes of running, it just stops. Logs don't show anything other than the output I write to the logs to check that everything ran without issues. I checked the BDD.log, SMSTS.log and the custom log generated by my script, but nothing out of the ordinary, no errors or warnings.

    I tried cutting out some checks and putting in some random stuff, but it doesn't seem to have issues with anything in the script as it stops after 3-4 minutes, regardless of what is in the script. But if I check the log it just stops after 3-4 minutes without any reason.

    Other than that, I have tried putting the script in an application but that just didn't do anything. It would literally stop after 5 seconds and continue with the rest of the TS. Tried calling it from a bat file, same issue.

    Anyone ever experienced the same issue?

    Version:

    Microsoft Deployment Workbench: 6.3.8443.1000

    Installing Windows 10 (1607/1703)

    Wednesday, August 30, 2017 12:55 PM

Answers

  • IT wouldn't surprise me if you don't have *another* installation task running in the background that reboots the machine after 3-4 minutes. 

    Rule: 
    Your application installer should not exit until it's finished, I mean finished, finished.

    Your application install should not reboot by itself, instead it should return 3010, and let ZTIApplications.wsf handle the rebooting. 

    That being, said I have never seen PowerShell.exe spontaneously exit. 

    IF you are still having problems, please upload your bdd.log to a public site lite onedrive and share the link here.


    Keith Garner - Principal Consultant [owner] - http://DeploymentLive.com


    Tuesday, September 5, 2017 4:59 AM

All replies

  • How are you executing your script?

    If you save your script in the Scripts folder you can then execute it like this:

    If you wanted to run it as an "application" then your quiet install command line would look like this:

    PowerShell.exe -ExecutionPolicy Bypass -File BIOSUpgrade.ps1


    If this post is helpful please vote it as Helpful or click Mark for answer.

    Friday, September 1, 2017 4:52 PM
  • A PS Script which run 4 Minutes to check something is really unusual.Can you show the script?

    Bis dann, Toni! Wenn Dir meine Antwort hilft dann markiere sie bitte als Antwort! Vielen Dank!

    Sunday, September 3, 2017 4:41 PM
  • Alternatively, add some logging to establish a baseline at which operation the script into issues.

    Cheers,
    Anton

    Vacuum Breather Blog | Wing Commander Saga | Twitter

    Note: Posts are provided "AS IS" without warranty of any kind. If posts are helpful please don't forget to rate them as "Helpful" or as "Answer".

    Sunday, September 3, 2017 4:56 PM
  • IT wouldn't surprise me if you don't have *another* installation task running in the background that reboots the machine after 3-4 minutes. 

    Rule: 
    Your application installer should not exit until it's finished, I mean finished, finished.

    Your application install should not reboot by itself, instead it should return 3010, and let ZTIApplications.wsf handle the rebooting. 

    That being, said I have never seen PowerShell.exe spontaneously exit. 

    IF you are still having problems, please upload your bdd.log to a public site lite onedrive and share the link here.


    Keith Garner - Principal Consultant [owner] - http://DeploymentLive.com


    Tuesday, September 5, 2017 4:59 AM