Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check multiple groups and map the drive? 3

Status
Not open for further replies.

ColdFlame

Technical User
Jul 24, 2007
48
0
0
CA
Hey there,

I'm trying to re-write my login scripts and amalgamate my 4 scripts into one login script. In doing so, there is tons of redundancy that I want to eliminate.

My main problem at the moment is trying to do something along these lines, but I'm not sure if it can be done in VBS...

If InGroup ("Accounting", "PayrollGroup", "HRGroup") Then
MapDrive "N:", "\\server\Acct"
End If

Is that right? I have seen, though now can't find, an example that did this:

If InGroup ("Accounting", "PayrollGroup", "HRGroup",0) Then
MapDrive "N:", "\\server\Acct"
End If

Essentially I want the script to check that particular user if they're in any of the aforementioned groups, and if so, then map that drive. I really don't want to have three if statements just to check those three groups.

TIA!

Jeremy
 
*blink blink* (-:

Cacls? Like a jackal? Hmm... I'll have a look and see if I can make this work. As usual, thanks for your help Brycspain. You must work similar hours to me (I'm on Mountain Time -07:00) as you seem to be ending your day on par with me, and starting at a similar time.

And yes, to answer your earlier question, I am using a GPO to deploy my scripts.

Jer
 
If you noticed my first reply post it was 5:07 so you made me have to work late =)

I'm actually on Central time and work 8 to 5.

Calcs isnt that bad actually. It's better for permissions then WMI.
 
You can also use XCACLS.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Thanks Mark,

I'll look into xcacls to see what the differences are. On a side note and I didn't want to start a new post on this however, do you have that snippet handy that enumerates all computers in an entire domain? I used it once but can't find it again.

 
Hi Bryce,

It is in my faq: faq329-4871

Also in your copy of The Admin Script Pack.



I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Thanks,

Believe it or not, I look in both places and didn't put 2 and 2 together....=(
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top