Solved

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

Posted on 2014-09-16
6
126 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
  • 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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 2

Expert Comment

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

The problems with reply email signatures

Do you wish that you could place an email signature under a reply? Well, unfortunately, you can't. That great Exchange/Office 365 signature you've created will just appear at the bottom of an email chain. What a pain! Is there really no way to solve this? Well, there might be...

Join & Write a Comment

Case Summary: In this Article we introduce the new method to configure the default user profile using Automated profile copy with sysprep rather than the old ways such as the manual copy of a configured profile to default user profile Old meth…
The environment that this is running in is SCCM 2007 R2 running on a Windows 2008 R2 server. The PXE Distribution point is running on its own Windows 2008 R2 box. This is what Event viewer showed after trying to start the WDS service:  An erro…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

757 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now