Is it possible to create a logon script based on OU and Group membership?

Is it possible to create a logon script based on OU and Group membership?
walkerpsAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
evandrotexConnect With a Mentor Jr Network AdministratorCommented:
If I understood, check this examples:

Set ADSysInfo = CreateObject("ADSystemInfo")      'gets ad info
Set CurrentUser = GetObject("LDAP://" & ADSysInfo.UserName) 'Identifies the user
strGroup = LCase(Join(CurrentUser.MemberOf)) 'checks the group

Then you use a "if". Example:

If InStr(strGroup, "cn=groupname") Then
 wshNetwork.MapNetworkDrive "X:","\\server\share"
End if
0
 
Ben StirlingOperations Technology AnalystCommented:
Yes you can!

However, as of vista scripts are … not the best option (UAC causes issues). Group policies is the better option, and can be applied to groups or OU’s.
0
 
walkerpsAuthor Commented:
Can group policies be applied to groups AND OU’s?
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
Ben StirlingOperations Technology AnalystCommented:
0
 
evandrotexJr Network AdministratorCommented:
Once you have the script, create a GPO under User Configuration - Windows Settings - Scripts - Logon (example) and link to OU.
0
 
Ben StirlingOperations Technology AnalystCommented:
Why use a script at all, you can do everything you need via GPO's?
0
All Courses

From novice to tech pro — start learning today.