Computer startup scripts let administrators run tasks automatically when Windows boots, before users begin normal work. This guide is for IT and DevOps teams managing Windows endpoints and explains how to assign startup scripts in both local and domain Group Policy, with verification steps you can use immediately.
Originally published on 2013-09-25; fully revised and updated.
This article expands the original note at devopsschool.com.

Choose the right Group Policy scope first
You can assign startup scripts either in Local Group Policy (single machine) or in a Domain Group Policy Object (GPO) (many machines). The configuration area is conceptually the same: Computer Configuration > Windows Settings > Scripts (Startup/Shutdown).
| Scope | Console path | Launch command | Best for |
|---|---|---|---|
| Local Group Policy | Local Computer Policy > Computer Configuration > Windows Settings > Scripts (Startup/Shutdown) | gpedit.msc | One machine, testing, break-fix changes |
| Domain GPO | GPO > Computer Configuration > Windows Settings > Scripts (Startup/Shutdown) | gpmc.msc | Centralized rollout to many domain-joined computers |
Assign a computer startup script step by step
- Open the Group Policy editor for your target scope.
- In the console tree, go to Scripts (Startup/Shutdown) under Computer Configuration > Windows Settings.
- In the details pane, open Startup.
- In Startup Properties, click Add.
- In Add a Script, set Script Name (path to the script, or browse for it) and optional Script Parameters.
- Use Up and Down to control execution order when multiple scripts are assigned, then click OK.
gpedit.msc
gpmc.mscCode language: CSS (css)
From the original procedure: you can browse for scripts in the domain controller Netlogon share, and pass parameters exactly as you would on the command line (example: //logo //I).
| Startup Properties option | What it does |
|---|---|
| Add | Assigns another startup script to the GPO |
| Edit | Updates selected script name or parameters |
| Remove | Unassigns selected script |
| Show Files | Opens the storage location for scripts tied to the selected GPO |
| Up / Down | Changes execution order for multiple startup scripts |
Workflow from assignment to execution
flowchart TD
A[Open policy editor] --> B[Go to Scripts Startup Shutdown]
B --> C[Open Startup Properties]
C --> D[Add script path and parameters]
D --> E[Set script order]
E --> F[Apply policy]
F --> G[Restart computer]
G --> H{Script ran as expected}
H -- no --> I[Check script path and permissions]
H -- yes --> J[Keep policy documented]
Example startup script and validation commands
A simple startup script can write a timestamp so you can confirm it executed at boot.
@echo off
echo Startup script ran on %COMPUTERNAME% at %DATE% %TIME% >> C:\Windows\Temp\startup-script.logCode language: CSS (css)
After assigning the script, force policy refresh and reboot for a quick test cycle.
gpupdate /force
shutdown /r /t 0
Common pitfalls and best practices
- Use clear naming for scripts and keep parameter usage documented in the GPO description.
- When multiple scripts are assigned, verify execution order with Up/Down before rollout.
- Keep script paths stable and accessible from target computers.
- Test on a small OU or pilot system before broad deployment.
- After changes, always validate with a policy refresh and reboot test.
I’m Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms.
I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.
Find Trusted Cardiac Hospitals
Compare heart hospitals by city and services — all in one place.
Explore Hospitals