Restart but continue script

This topic contains 1 reply, has 1 voice, and was last updated by  Chad Nathan Jones 5 months, 1 week ago.

  • Author
    Posts
  • #68596

    Chad Nathan Jones
    Participant

    I've been battling on how to does this as I am limited to Powershell 2.0 for these scripts. It is basically an onboarding script to automate the process of configuring settings, domaining the computer and all that. Script works when I open it, it copies a batch file to the startup but the batch file doesn't fire the script it is suppose to call. I've tried with RunOnce and no luck there. Any ideas on how to call my next script on start up?

    All scripts get copied to C:\Temp\Onboarding\ in the very beginning.This is what the Batch file in the Startup folder has but it doesn't run.

    powershell -sta -noexit "& ""C:\Temp\Onboarding\Onboarding2.ps1"""
  • #68599

    Chad Nathan Jones
    Participant

    Turns out the issue appears to have been the encoding the batch file was saved in. Once I chose ANSI it was running from the Start folder

You must be logged in to reply to this topic.