Windows 10: How run Powershell at the first PC start or before the OS boot

Discus and support How run Powershell at the first PC start or before the OS boot in Windows 10 Support to solve the problem; I would like to start a powershell script (change the name of the PC): 1) before the OS boot ( preferible) or 2) at the first run (just once) I... Discussion in 'Windows 10 Support' started by epulone, Nov 14, 2017.

  1. epulone Win User

    How run Powershell at the first PC start or before the OS boot


    I would like to start a powershell script (change the name of the PC):

    1) before the OS boot ( preferible) or
    2) at the first run (just once)

    I prefer the first option but I couldn't find a way to do it.
    About the second option I have tried using a bach file with the commands below:

    I located it in start
    to execute the powershell file at the first start but it didn't work. If I run manually the powershell file works fine.

    Thanks

    :)
     
    epulone, Nov 14, 2017
    #1
  2. Gil deG Win User

    why won't my PC boot up all the way on the first try?

    Hi,

    For us to better know your concern, we'd like to ask some information.

    1. When did the issue occur?

    2. Did you make any changes in your computer prior to the issue?

    3. What troubleshooting steps have you done so far to fix the issue?
     
    Gil deG, Nov 14, 2017
    #2
  3. why won't my PC boot up all the way on the first try?

    I need to restart my HP PC twice and push several keys on my keyboard before it will boot up
     
    Biomac1McConnell, Nov 14, 2017
    #3
  4. How run Powershell at the first PC start or before the OS boot

    Are you doing this operation in say a system image of a computer? Are you using System Center to image the PC?

    It is possible to rename the computer, but what do you want to name it to?
     
    Masterchiefxx17, Nov 15, 2017
    #4
  5. epulone Win User
    Thank you masterchief. I am doing an image deployment to a large number of pc. No I am not using system centre .... the deployment is done by clonezilla server. The script will check the MAC address , change the name of the pc based on the asset number labled on it. Once the image is insalled I would like the script start at the first logon of the pc.
    In this case it will save nt a lot of time.

    Thanks
     
    epulone, Apr 4, 2018
    #5
Thema:

How run Powershell at the first PC start or before the OS boot

Loading...
  1. How run Powershell at the first PC start or before the OS boot - Similar Threads - run Powershell start

  2. PC not booting to os

    in Windows 10 Gaming
    PC not booting to os: my pc suddenly stopped booting and went into recovery mode and when I put recovery key it didn't fix the problem. It's now booting to bios and even though my drives and ssd are fine, in boot sequence in bios it does not show it and the only option is windows boot manager....
  3. PC not booting to os

    in Windows 10 Software and Apps
    PC not booting to os: my pc suddenly stopped booting and went into recovery mode and when I put recovery key it didn't fix the problem. It's now booting to bios and even though my drives and ssd are fine, in boot sequence in bios it does not show it and the only option is windows boot manager....
  4. PC not booting to os

    in Windows 10 Installation and Upgrade
    PC not booting to os: my pc suddenly stopped booting and went into recovery mode and when I put recovery key it didn't fix the problem. It's now booting to bios and even though my drives and ssd are fine, in boot sequence in bios it does not show it and the only option is windows boot manager....
  5. Virtual Host requires F1 before booting into OS

    in Windows 10 Software and Apps
    Virtual Host requires F1 before booting into OS: Good day,Can anyone try and help with the following error.We checked date and time in Bios is correct CMOS is also checking out fine on iDrac, but server keeps asking to press F1 to continue into OS....
  6. Change first boot image (before PIN request)

    in Windows 10 Support
    Change first boot image (before PIN request): I'm very tired of looking at that cave with two rocks outside. How can I get at that startup image to change it? It is the first thing that comes up after the OS boot options screen closes.. Win 10 21H1-19043 183818
  7. slow booting and slow pc at first how to fix?

    in Windows 10 BSOD Crashes and Debugging
    slow booting and slow pc at first how to fix?: my pc when i use it at first my pc is so slow than a old computer then when i restart my pc it will be fast againhow do i fix it without restarting over and over?...
  8. PC crashes first boot

    in Windows 10 BSOD Crashes and Debugging
    PC crashes first boot: i got my pc second handed a few months ago and it was working fine. But in the recent weeks my pc crashes within the first 5 min of the first boot, i've tried cleaning the hardware but it still crashes. the crashes can include the following: screen suddenly freezing and not...
  9. Windows dual boot loads OS before selector

    in Windows 10 Installation and Upgrade
    Windows dual boot loads OS before selector: I installed in dual boot two different Windows 10 OSs: Enterprise and Pro. The default OS is ENT. I turned off 'Fast startup' on both OSs. When I boot my machine, the default OS seems to be loading before the OS selector shows up. That's not a problem if I continue with ENT,...
  10. how to start PowerShell core

    in Windows 10 Installation and Upgrade
    how to start PowerShell core: I don't know if I have to launch it in a separate session from within PowerShell or not, trying to run from admin mode so I can test it out, just installed 6.1 preview, and I searched the web for info on how to do this but all results came up empty,any help with this would be...