Restart but continue script

Welcome Forums General PowerShell Q&A Restart but continue script

This topic contains 1 reply, has 1 voice, and was last updated by

 
Participant
1 year, 8 months ago.

  • Author
    Posts
  • #68596

    Participant
    Points: 0
    Rank: Member

    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

    Participant
    Points: 0
    Rank: Member

    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

The topic ‘Restart but continue script’ is closed to new replies.