Re: Group Policy Timeout on one server in an OU.



Ok. Thanks. There are a lot of places where that script could hang. One thing I would recommend for testing purposes. Create a copy of this script and run it for a test user on that machine. In the copy of the script, take out all the "on error resume next" lines, which essentially tell the script that even if they encounter an error, just ignore it and keep running. Once that's done, then make sure that logon scripts are set to run visible by enabling user configuration\admin templates\system\scripts\run logon scripts visible.

The goal is to see the messages on the screen as they either hang or go by.

--
Darren Mar-Elia
MS-MVP-Windows Server--Group Policy
http://www.gpoguy.com -- The Windows Group Policy Information Hub:
FAQs, Training Videos, Whitepapers and Utilities for all things Group
Policy-related
Group Policy Management solutions at http://www.sdmsoftware.com




<dbondura@xxxxxxxxx> wrote in message news:1165516804.827051.108550@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Option Explicit

Dim objTrans, objNetwork
Dim strUserDN, strComputerDN, objUser, objSysInfo
Dim strComputer
Dim objGroup5 , objGroup18 , objGroup22

Set objNetwork = CreateObject("Wscript.Network")
Set objSysInfo = CreateObject("ADSystemInfo")
strUserDN = objSysInfo.userName
Set objUser = GetObject("LDAP://"; & strUserDN)

' Bind to a group object in Active Directory with the LDAP provider.
Set objGroup5 = GetObject("LDAP://cn=Med CLC,ou=groups,ou=FSU
Campus,dc=med,dc=ad,dc=fsu,dc=edu")
Set objGroup18 = GetObject("LDAP://cn=Med ERAS,ou=groups,ou=FSU
Campus,dc=med,dc=ad,dc=fsu,dc=edu")
Set objGroup22 = GetObject("LDAP://cn=Med
Communications,ou=groups,ou=FSU Campus,dc=med,dc=ad,dc=fsu,dc=edu")

' Map a network drive if the user is a member of the group.
If objGroup5.IsMember(objUser.AdsPath) Then
On Error Resume Next
objNetwork.RemoveNetworkDrive "G:", True, True
objNetwork.MapNetworkDrive "G:",
"\\networkfiles.med.ad.fsu.edu\dfs\Academic Affairs\OME\CLC"
On Error GoTo 0
End If

If objGroup5.IsMember(objUser.AdsPath) Then
On Error Resume Next
objNetwork.RemoveNetworkDrive "J:", True, True
objNetwork.MapNetworkDrive "J:", "\\fsucom016.med.ad.fsu.edu\CLC"
On Error GoTo 0
End If

If objGroup5.IsMember(objUser.AdsPath) Then
On Error Resume Next
objNetwork.RemoveNetworkDrive "K:", True, True
objNetwork.MapNetworkDrive "K:", "\\fsucom016.med.ad.fsu.edu\CLC_SP"
On Error GoTo 0
End If

If objGroup22.IsMember(objUser.AdsPath) Then
On Error Resume Next
objNetwork.RemoveNetworkDrive "G:", True, True
objNetwork.MapNetworkDrive "G:",
"\\networkfiles.med.ad.fsu.edu\dfs\Executive\Communications"
On Error GoTo 0
End If

On Error Resume Next
objNetwork.RemoveNetworkDrive "I:", True, True
objNetwork.MapNetworkDrive "I:" ,
"\\networkfiles.med.ad.fsu.edu\dfs\Images"
On Error GoTo 0

On Error Resume Next
objNetwork.RemoveNetworkDrive "N:", True, True
objNetwork.MapNetworkDrive "N:" , "\\networkfiles.med.ad.fsu.edu\DFS"
On Error GoTo 0

If objGroup18.IsMember(objUser.AdsPath) Then
On Error Resume Next
objNetwork.RemoveNetworkDrive "T:", True, True
objNetwork.MapNetworkDrive "T:", "\\fsucomeras\dwserver.2k6"
On Error GoTo 0
End If

' Clean up.
Set objTrans = Nothing
Set objNetwork = Nothing
Set objUser = Nothing
Set objGroup5 = Nothing
Set objGroup18 = Nothing
Set objGroup22 = Nothing

On Dec 7, 1:30 pm, "Darren Mar-Elia" <dmanonym...@xxxxxxxxxxxxx>
wrote:
What does the script do, exactly? Can you post it here? That may give us an
idea of why it would hang.

--
Darren Mar-Elia
MS-MVP-Windows Server--Group Policyhttp://www.gpoguy.com-- The Windows Group Policy Information Hub:
FAQs, Training Videos, Whitepapers and Utilities for all things Group
Policy-related
Group Policy Management solutions athttp://www.sdmsoftware.com

<dbond...@xxxxxxxxx> wrote in messagenews:1165516003.254023.279540@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx



> The script is a user logon script, it is just applied to all members of
> the domain. GPresult does show it in the user settings: applied GPO

> On Dec 7, 1:05 pm, "Darren Mar-Elia" <dmanonym...@xxxxxxxxxxxxx>
> wrote:
>> So the script is a computer startup script and not a user logon >> script?
>> Does
>> gpresult show the script and show which GPO its coming from? Another
>> option
>> here is that you can reduce the timeout before scripts give up by >> setting
>> the policy at computer configuration\admin
>> templates\system\scripts\maximum
>> wait time for GP scripts

>> --
>> Darren Mar-Elia
>> MS-MVP-Windows Server--Group Policyhttp://www.gpoguy.com--The Windows
>> Group Policy Information Hub:
>> FAQs, Training Videos, Whitepapers and Utilities for all things Group
>> Policy-related
>> Group Policy Management solutions athttp://www.sdmsoftware.com

>> <dbond...@xxxxxxxxx> wrote in
>> messagenews:1165514346.661268.137600@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

>> > When I run GPResult I can see that GPOs are applied successfully, >> > but
>> > it is still hanging a long time at startup and the terminated GPO >> > error
>> > still rears its head.

>> > On Dec 7, 12:43 pm, "Darren Mar-Elia" <dmanonym...@xxxxxxxxxxxxx>
>> > wrote:
>> >> And possibly its a logon script that only applies to certain users
>> >> that
>> >> log
>> >> onto that machine. You might just want to run gpresult when that
>> >> problem
>> >> user is logged on to see what the script is.

>> >> --
>> >> Darren Mar-Elia
>> >> MS-MVP-Windows Server--Group >> >> Policyhttp://www.gpoguy.com--TheWindows
>> >> Group Policy Information Hub:
>> >> FAQs, Training Videos, Whitepapers and Utilities for all things >> >> Group
>> >> Policy-related
>> >> Group Policy Management solutions athttp://www.sdmsoftware.com

>> >> "Roger Abell [MVP]" <mvpNoS...@xxxxxxx> wrote in
>> >> messagenews:eSx8fZhGHHA.960@xxxxxxxxxxxxxxxxxxxxxxx

>> >> > It sounds like a script is not completing.
>> >> > Perhaps you need to look at what the scripts are doing.

>> >> > <dbond...@xxxxxxxxx> wrote in message
>> >> >news:1165505212.004203.294760@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>> >> >> Hello,

>> >> >> This problem was brought to my attention late last week, and I >> >> >> have
>> >> >> not
>> >> >> been able to find much useful information to adapt to our setup.
>> >> >> The
>> >> >> affected computer is a Windows 2k3 Ent. SP1 machine running >> >> >> Sawmill
>> >> >> as
>> >> >> an application server for Sharepoint Analysis by our Web Admin.
>> >> >> She
>> >> >> complained it took awhile to login.

>> >> >> The hangup occurs after all the settings are applied, and it >> >> >> hangs
>> >> >> on
>> >> >> a
>> >> >> desktop background image, like it is waiting for the Start
>> >> >> Menu/services/etc. to load.

>> >> >> Upon analysis of the event log I found this in the application
>> >> >> event
>> >> >> log:

>> >> >> --Execution of GPO scripts has timed out and have been >> >> >> terminated.

>> >> >> That is it. The computer is in AD, in the same OU as about 50
>> >> >> other
>> >> >> servers, and this is the only one having this problem. It will
>> >> >> eventually login once the time limit has been reached.

>> >> >> If I logon with any account local to the server it logs right >> >> >> in.

>> >> >> I can successfully run gpupdate after it logs in, there are no
>> >> >> other
>> >> >> errors I get.

>> >> >> I have tried rejoining the machine to the domain, and a few >> >> >> other
>> >> >> tricks, but have been unsuccessful so far.

>> >> >> Any help would be greatly appreciated!

>> >> >> Thanks,
>> >> >> David Bondurant
>> >> >> FSU-College of Medicine
>> >> >> Sys Admin- Hide quoted text -- Show quoted text -- Hide quoted
>> >> >> text -- Show quoted text -- Hide quoted text -- Show quoted >> >> >> text -


.



Relevant Pages

  • Re: Group Policy Timeout on one server in an OU.
    ... inheritance of that login script and placed myself in the OU. ... On Error GoTo 0 ... Group Policy Management solutions athttp://www.sdmsoftware.com ...
    (microsoft.public.windows.group_policy)
  • Re: Group Policy Timeout on one server in an OU.
    ... inheritance of that login script and placed myself in the OU. ... On Error GoTo 0 ... Group Policy Management solutions athttp://www.sdmsoftware.com ...
    (microsoft.public.windows.group_policy)
  • Re: Logon Scripts Acrossed VPN
    ... What does GPMC GPREsults show under the Group Policy Infrastructure Component Status for one of those machines? ... I think this error is related to computer processing rather than your logon script issue but still probably worth figuring out if there is a problem. ... Darren Mar-Elia ... > This same error seems to be on every system in my remote offices. ...
    (microsoft.public.windows.group_policy)
  • Re: Group Policy Timeout on one server in an OU.
    ... inheritance of that login script and placed myself in the OU. ... On Error GoTo 0 ... Group Policy Information Hub: ... Group Policy Management solutions athttp://www.sdmsoftware.com ...
    (microsoft.public.windows.group_policy)
  • Re: Group Policy Timeout on one server in an OU.
    ... Deny Apply for the GPO that defines the login script ... On Error GoTo 0 ... Group Policy Management solutions athttp://www.sdmsoftware.com ...
    (microsoft.public.windows.group_policy)