Solved

Run GPO VBscript once

Posted on 2006-11-03
1
2,452 Views
Last Modified: 2006-11-18
Hi,

I have written a VBScript to add a domain group into the local administrators group. This has been added to the startup script group of a computer GPO however it is applied every time. How can I run the script only once on the PC?

Regards,

Michael
0
Comment
Question by:Barnardos_2LS
1 Comment
 
LVL 9

Accepted Solution

by:
SamuraiCrow earned 125 total points
Comment Utility
In that same script add some simple conditional processing:

if exist \\servername\sharename\%computername%.txt goto End

:Start

<VBS file adding domain group to local admin group>
echo %computername% > \\servername\sharename\%computername%.txt

:End

This will basically create a tiny text file with the computers name as the title.  It will check for the file and skip the install if it exists.  You can also park this file on the local computer as well if you like.

Hope this help
Crow
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Learn about cloud computing and its benefits for small business owners.
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now