Solved

Run GPO VBscript once

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

Suggested Solutions

Title # Comments Views Activity
GPO Access denied in AD 12 52
Screen Mirroring 7 75
Auslogics BoostSpeed 9 software 5 79
Problems with Microsoft.DHCP.PowerShell.Admin Module 4 71
Preface Having the need * to contact many different companies with different infrastructures * do remote maintenance in their network required us to implement a more flexible routing solution. As RAS, PPTP, L2TP and VPN Client connections are no…
Setting up a Microsoft WSUS update system is free relatively speaking if you have hard disk space and processor capacity.   However, WSUS can be a blessing and a curse. For example, there is nothing worse than approving updates and they just have…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

840 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