Solved

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

Posted on 2014-09-16
6
145 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 500 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
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 
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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

My previous article  (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/Windows_Server_2008/A_4466-A-beginners-guide-to-installing-SCCM2007-on-Windows-2008-R2-Server.html)detailed one possible method to get SCCM 2007 installed an…
On a regular basis I get questions about slow RDP performance, RDP connection problems, strange errors and even BSOD, remote computers freezing or restarting after initiation of a remote session. In a lot of this cases the quick solutions made b…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

632 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