Question Locked

Inconsistant GPO application

0 helpful
6 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have a situation where a GPO is not being applied consistantly.
Consistant may not be a good term, the error is consistant.
I have a log-on script setup to run via a GPO that maps a network drive as "S". A user comes to work in the moring and logs into his computer and the drive does not map. gpresult shows the GPO is applied. log off user and log back in and the drive is mapped.
Both times I run the gpresult it shows the same DC.
Any ideas.

Thanks in advance.

6 replies

by bens

First off what error are you getting? Is this a batch script, VB?

I personally find that a batch file that is stored in the NETLOGON share the easiest way to manage mapped drives on logon. I manage the deployment through the profile tab > logon script of the user profile in Active Directory.

by netjess

The current setting looks like this:

User Configuration
Windows Settings
Scripts
Logon
Name Parameters
\\domain.com\SysVol\afrmic.com\scripts\mips_S_drive.vbs

Here is the script:
------------------------------------------
'MapDrive.vbs, Mapping drive letters in GPO
'
Option Explicit
On Error Resume Next

Dim wshNetwork, wshShell, wshSysEnv, colDrives, nReturnCode
Dim i, strDrive, strShare

strDrive = "S:"
strShare = "\\ServerName\share"

Set wshNetwork = WScript.CreateObject("WScript.Network")
Set wshShell = WScript.CreateObject("WScript.Shell")

'BEGIN CALLOUT A
Set wshSysEnv = wshShell.Environment("SYSTEM")
'END CALLOUT A

If (wshSysEnv("OS") = "Windows_NT") Then

'BEGIN CALLOUT B
Set colDrives = wshNetwork.EnumNetworkDrives
For i = 0 To colDrives.Count - 1 Step 2
If (colDrives(i) = strDrive) Then
wshNetwork.RemoveNetworkDrive strDrive
End If
Next
wshNetwork.MapNetworkDrive strDrive, strShare
'END CALLOUT B

End If

Set wshNetwork = Nothing
Set wshShell = Nothing
WScript.Quit(nReturnCode)
------------------------------
I have other drive mappings in other GPOs that use this same script.

by ic-it

Xp doesn't always wait for the network at startup. Set a Policy to insure the wait

This policy is controlled by the setting in Computer Configuration\Administrative Templates\System\Logon\Always wait for the network at computer startup and logon.

You can read more here;
http://technet.microsoft.com/en-us/library/cc785665.aspx

by netjess

Have you done this? Do you know what the impact would be for cached netowrk log-in on a laptop that is disconnected from the network?

by ic-it

The laptop should work the same as W2K did, as long as cached logons are available it will eventually give up waiting for the network and allow the use of cached logon data.

Do not implement this policy on a laptop that the user has not logged onto before (or insure that they logon before going mobile).

This discussion is closed to new replies.