Solved

Run GPO VBscript once

Posted on 2006-11-03
1
2,499 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

by Batuhan Cetin Within the dynamic life of an IT administrator, we hold many information in our minds like user names, passwords, IDs, phone numbers, incomes, service tags, bills and the order from our wives to buy milk when coming back to home.…
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…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

685 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