Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2014-09-16
6
Medium Priority
?
150 Views
Last Modified: 2014-10-02
Is it possible to create a logon script based on OU and Group membership?
0
Comment
Question by:walkerps
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 3

Accepted Solution

by:
evandrotex earned 1500 total points
ID: 40326335
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
 
LVL 2

Expert Comment

by:Ben Stirling
ID: 40326341
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
 

Author Comment

by:walkerps
ID: 40326767
Can group policies be applied to groups AND OU’s?
0
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
LVL 3

Expert Comment

by:evandrotex
ID: 40327628
Once you have the script, create a GPO under User Configuration - Windows Settings - Scripts - Logon (example) and link to OU.
0
 
LVL 2

Expert Comment

by:Ben Stirling
ID: 40327743
Why use a script at all, you can do everything you need via GPO's?
0

Featured Post

Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Some time ago I faced the need to use a uniform folder structure that spanned across numerous sites of an enterprise to be used as a common repository for the Software packages of the Configuration Manager 2007 infrastructure. Because the procedu…
Have you considered what group policies are backwards and forwards compatible? Windows Active Directory servers and clients use group policy templates to deploy sets of policies within your domain. But, there is a catch to deploying policies. The…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question