Re: VB scripting for machine Startup and GPO information

Tech-Archive recommends: Fix windows errors by optimizing your registry




"Al Dunbar" <alandrub@xxxxxxxxxxx> wrote in message
news:eomSRGZsJHA.4592@xxxxxxxxxxxxxxxxxxxxxxx

"Wirrel" <Wirrel@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:C7055F12-1943-4DB2-ABE3-ED4D8950E30A@xxxxxxxxxxxxxxxx
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
--


.



Relevant Pages

  • Re: Logon Script Elevated Privileges
    ... script within the GPO if you want, such as selecting from between user ... I'm using XCacls.vbs to create the permissions structure. ... the root folder to create the folder, ...
    (microsoft.public.windows.group_policy)
  • Re: Install Windows Patch via GPO
    ... This posting is provided "AS IS" with no warranties, ... What else do I need to add to the script? ... I ran gpresult on the computer and it doesnt show my test GPO. ... I can also get to the folder from the computer directly. ...
    (microsoft.public.windows.group_policy)
  • Re: Install Windows Patch via GPO
    ... What else do I need to add to the script? ... I ran gpresult on the computer and it doesnt show my test GPO. ... I can also get to the folder from the computer directly. ... Server - Server 2003 SP2 ...
    (microsoft.public.windows.group_policy)
  • Re: User - Group - Shared Folder
    ... You can use the same batch file, place it on a network share, but use GPO instead, make sure that the group that you want to apply the script has read and apply permissions to that GPO, remove the authenticated users apply permissions to that new GPO. ... On file server I made Shared Folder called "Accounting". ...
    (microsoft.public.windows.server.active_directory)
  • Re: Install Windows Patch via GPO
    ... I did gpresult on the PCs and the GPO is showing up now. ... Browse when you want to add a new script or put the ... only reply to Newsgroups ... Ethernet adapter Local Area Connection 1: ...
    (microsoft.public.windows.group_policy)