Solved

Run GPO VBscript once

Posted on 2006-11-03
1
2,462 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
ID: 17868485
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

by Batuhan Cetin In this article I will be guiding through the process of removing a failed DC metadata from Active Directory (hereafter, AD) using the ntdsutil tool in a Windows Server 2003 environment. These steps are not necessary in a Win…
On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
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…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

911 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

25 Experts available now in Live!

Get 1:1 Help Now