Hi there,
I am having a few problems with home drives loosing their mappings after trying to introduce a printer mapping script via group policy.
Some history - We have had an AD for several years, but not really utilized group policy for running scripts. All users have their home drive set in their AD user account profile (mapped to Z: ) and a login script (connect.bat). This has been fine and works well.
In the past, all printers (even network ones) were installed as local printers with the effect that all the computers held their own queue which obviously causes problems with monitoring and management.
On to the changes. We created printer queues on one of our servers and shared them into the AD. We then decided to use one of the scripts from here to assign the printers through a login script. The script is:
Set objWshNetwork = CreateObject("WScript.Network")
Set objAdsSystemInfo = CreateObject("adsysteminfo")
Set objComputerName = GetObject("LDAP://" & objAdsSystemInfo.ComputerName)
Set objOU = GetObject(objComputerName.Parent)
strOU = replace(objOU.Name,"OU=","")
Select Case strOU
Case "Room T1"
objWshNetwork.AddWindowsPrinterConnection "\\SERVER\Room T1 - Laser"
objWshNetwork.SetDefaultPrinter
Case "Room T2"
objWshNetwork.AddWindowsPrinterConnection "\\SERVER\Room T2 - Laser"
objWshNetwork.SetDefaultPrinter
End Select
This worked fine on all my tests, so we rolled it out to the students and we started to get problems with the Z: drive not being mapped for some of the students when the logged in. It would map to \\server\share but not the \\server\share\userid folder. We rolled the script back and the problems went away, so it was clearly an issue with the script.
I could see no problem with it, but decided to trial a simpler version of the script targetted at just one room. The script them became
Set objWshNetwork = CreateObject("WScript.Network")
objWshNetwork.AddWindowsPrinterConnection "\\SERVER\Room T1 - Laser"
objWshNetwork.SetDefaultPrinter
This still caused problems with the Z: drive - but only in that room, again indicating a problem with the script.
I took out the SetDefaultPrinter line and tried this, and the script ran for a week without causing a single Z: drive mapping problem.
I decided that it must be the SetDefaultPrinter causing a problem, and so removed this from the original script, but on applying this back to the students the z: drive mapping problem happended again straight away.
So - I am at my wits end - there are no entries in any logs I can find, but there seems to be some issue between the home drive mapping, the profile login script and the group policy login scripts. Has anyone seen something like this before - any ideas of what could be wrong?
Many thanks for any help - apologies for the long post - just wanted people to see what I had tried so far.
Cheers
Jonathan