Find the Best Cosmetic Hospitals

Explore trusted cosmetic hospitals and make a confident choice for your transformation.

“Invest in yourself — your confidence is always worth it.”

Explore Cosmetic Hospitals

Start your journey today — compare options in one place.

How to Assign Computer Startup Scripts with Group Policy (Local and Domain GPO)

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.

Group Policy startup scripts configuration

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).

ScopeConsole pathLaunch commandBest for
Local Group PolicyLocal Computer Policy > Computer Configuration > Windows Settings > Scripts (Startup/Shutdown)gpedit.mscOne machine, testing, break-fix changes
Domain GPOGPO > Computer Configuration > Windows Settings > Scripts (Startup/Shutdown)gpmc.mscCentralized rollout to many domain-joined computers

Assign a computer startup script step by step

  1. Open the Group Policy editor for your target scope.
  2. In the console tree, go to Scripts (Startup/Shutdown) under Computer Configuration > Windows Settings.
  3. In the details pane, open Startup.
  4. In Startup Properties, click Add.
  5. In Add a Script, set Script Name (path to the script, or browse for it) and optional Script Parameters.
  6. 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 optionWhat it does
AddAssigns another startup script to the GPO
EditUpdates selected script name or parameters
RemoveUnassigns selected script
Show FilesOpens the storage location for scripts tied to the selected GPO
Up / DownChanges 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.

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
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.

Related Posts

Top 50 interview questions and answers for JSP

The JavaServer Pages (JSP) is a Java normal technology that allows you to write lively, data-driven pages for your Java web applications. The JSP is built on…

Read More

Top 50 questions and answers for vue.js

The Vue (pronounced /vjuː/, like view) is a liberal framework for building user borders. Dissimilar other huge frameworks, Vue is designed from the ground up to be…

Read More

Top 50 interview questions and answers for Type Script

Top 50 interview questions and answers for Type Script The Typescript is a powerfully typed, object oriented, compiled language. It was designed by Anders Hejlsberg (designer of…

Read More

Script for time stamp update.

scmuser created the topic: Script for time stamp update. write a batch Script for time stamp update? sgadmin replied the topic: Re:Script for time stamp update. [code…

Read More

%~dp0 VS %cd%

rajeshkumar created the topic: %~dp0 VS %cd% Use of %~dp0 and Use of %cd% They are not equivalent. %cd% is available either to a batch file or…

Read More

Send mail using batch script thorugh SMTP

scmuser created the topic: Send mail using batch script thorugh SMTP Hello, hi i wnt to create batch file that will automtcally send my email through outlok…

Read More
Subscribe
Notify of
guest
0 Comments
Newest
Oldest Most Voted
0
Would love your thoughts, please comment.x
()
x