Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > VB Script

Vista - VB scripting for machine Startup and GPO information

Reply
 
Old 03-30-2009   #1 (permalink)
Wirrel


 
 

VB scripting for machine Startup and GPO information

Here is problem trying to figure out. I have a script that runs at machine
start up that we set in the Domain level GPO. Set another script in an ou
level that may change the setting that was set in the domain level gpo. We
would like to be able to see if and when this happens using the event log to
monitor this. I have added the few lines to create a log entry in the script
but the problem now is that even log doesnt say which GPO the script is
running from.

I need a function that will determine the GPO that the script is running
from.

Thanks

Wirrel

My System SpecsSystem Spec
Old 03-30-2009   #2 (permalink)
Al Dunbar


 
 

Re: VB scripting for machine Startup and GPO information


"Wirrel" <Wirrel@xxxxxx> wrote in message
news:C7055F12-1943-4DB2-ABE3-ED4D8950E30A@xxxxxx
Quote:

> Here is problem trying to figure out. I have a script that runs at
> machine
> start up that we set in the Domain level GPO. Set another script in an ou
> level that may change the setting that was set in the domain level gpo.
> We
> would like to be able to see if and when this happens using the event log
> to
> monitor this. I have added the few lines to create a log entry in the
> script
> but the problem now is that even log doesnt say which GPO the script is
> running from.
>
> I need a function that will determine the GPO that the script is running
> from.
I do not know for sure, but I suspect this might not be possible. Perhaps a
simpler method would be to use a differently named script for each GPO, and
have it add its name to the log.

/Al


My System SpecsSystem Spec
Old 03-30-2009   #3 (permalink)
Richard Mueller [MVP]


 
 

Re: VB scripting for machine Startup and GPO information


"Al Dunbar" <alandrub@xxxxxx> wrote in message
news:eomSRGZsJHA.4592@xxxxxx
Quote:

>
> "Wirrel" <Wirrel@xxxxxx> wrote in message
> news:C7055F12-1943-4DB2-ABE3-ED4D8950E30A@xxxxxx
Quote:

>> Here is problem trying to figure out. I have a script that runs at
>> machine
>> start up that we set in the Domain level GPO. Set another script in an
>> ou
>> level that may change the setting that was set in the domain level gpo.
>> We
>> would like to be able to see if and when this happens using the event log
>> to
>> monitor this. I have added the few lines to create a log entry in the
>> script
>> but the problem now is that even log doesnt say which GPO the script is
>> running from.
>>
>> I need a function that will determine the GPO that the script is running
>> from.
>
> I do not know for sure, but I suspect this might not be possible. Perhaps
> a simpler method would be to use a differently named script for each GPO,
> and have it add its name to the log.
>
> /Al
>
A script can determine the folder where it is saved (the ScriptFullName or
Path property of the Wscript object), which would indicate the GPO, but the
folder name is the GUID of the GPO. Much simpler would be to simply write a
GPO description string to the log file, as suggested.

--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--


My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
msdn scripting information VB Script
Shutdown and startup Hyper-V Virtual Machine via script Virtual Server
Machine startup GPO Vista General
Retrieve information of a remote machine in vbscript VB Script
Scripting - pull out information from System Properties->General_> PowerShell


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46