rdvarghese
asked on
Microsoft, Windows Server, 2003, AD Based GPO
On the AD for our domain, we have a single Staff Group policy defined with a simple logon batch script. This script is used only for mapping drives. Currently, the logon batch script maps like 7 different drives. (like accounting, services, contracts, ... etc)
How can i modify the script so that users in Accouting OU maps ONLY to the Accounting Folder.
so for Example:
Accounting - Maps only to Accounting Folder.
Services - Maps only to Services Folder.
Contracts - Maps only to Contracts Folder
i created different OU's for each department, but they all need new GPO's - because if i tried to link the existing Staff GPO, then it will still the use the old .bat file. I also tried setting up scripts based on each individual user properties on AD - under logon script- but that is not even getting executed. (made sure that no existing GPO policies are getting inherited or linked)
i am new to VBScripts. - Can this be done using Batch Scripts? is there a way to set an IF condition like
IF OU = "Accounting" then net use... or is that doable only on a VB script?
How can i modify the script so that users in Accouting OU maps ONLY to the Accounting Folder.
so for Example:
Accounting - Maps only to Accounting Folder.
Services - Maps only to Services Folder.
Contracts - Maps only to Contracts Folder
i created different OU's for each department, but they all need new GPO's - because if i tried to link the existing Staff GPO, then it will still the use the old .bat file. I also tried setting up scripts based on each individual user properties on AD - under logon script- but that is not even getting executed. (made sure that no existing GPO policies are getting inherited or linked)
i am new to VBScripts. - Can this be done using Batch Scripts? is there a way to set an IF condition like
IF OU = "Accounting" then net use... or is that doable only on a VB script?
ASKER
Thank you Rob.
Can the below code to rename mydocuments be included in the logon script ?
http://www.gpanswers.com/community/viewtopic.php?p=2094
if so, would it go at the end ?
Can the below code to rename mydocuments be included in the logon script ?
http://www.gpanswers.com/community/viewtopic.php?p=2094
if so, would it go at the end ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
'============
Set objNetwork = CreateObject("WScript.Netw
Set objFSO = CreateObject("Scripting.Fi
Set objSysInfo = CreateObject("ADSystemInfo
strUserName = objSysInfo.UserName
Set objUser = GetObject("LDAP://" & strUserName)
arrOUs = Split(objComputer.Parent, ",")
arrMainOU = Split(arrOUs(0), "=")
Select Case arrMainOU(1)
Case "Accounting"
If objFSO.DriveExists("F:") = False Then
objNetwork.MapNetworkDrive
End If
Case "Services"
If objFSO.DriveExists("G:") = False Then
objNetwork.MapNetworkDrive
End If
Case "Contracts"
If objFSO.DriveExists("H:") = False Then
objNetwork.MapNetworkDrive
End If
End Select
Set objNetwork = Nothing
Set objUser = Nothing
'============
Regards,
Rob.