Solved

KIX script: map drive based on OU membership

Posted on 2008-06-11
3
2,620 Views
Last Modified: 2012-06-22
I am trying to convert our current vbs login script to kix script.

The script maps a drive based on OU membership, eg:
===============================
select case LCase (oParent.name)
     case "ou=execs"
      oNet.RemoveNetworkDrive "S:"
      oNet.MapNetworkDrive "S:", "\\CORPFS01\Execs$"
end select
==============================

I want to do the same thing with KIX, but am having no luck in getting the IF inOU("Execs") variable working.

Is there a simple way to do this?


Mapping drives via group memberships is working fine by using
IF InGroup("groupname") =1
   use f: \\corpfs01\fileshare
ENDIF

What am I missing???????
0
Comment
Question by:davewhy
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
Isorg earned 500 total points
ID: 21764260
in kix there is no InOU() command.

but there is a really nice InContainer() UDF that can be found here.  http://www.kixtart.org/forums/ubbthreads.php?ubb=showflat&Number=82433&site_id=1#import
0
 

Author Comment

by:davewhy
ID: 21764557
Thankyou Isorg.  I shall setup the UDF and try to call from the script.  Any tips?

0
 

Author Comment

by:davewhy
ID: 21767824
Isorg, the InContainer() and dependent TranslateName() UDF's worked a treat.  I have included both in a seperate UDF (.kxf) file, called them from the script, and got the result I wanted.  Brilliant.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to count json data 2 66
Need to learn promise API 2 43
AutoHotkey ActiveX Component Error 8 71
AWS CLI - Instances, Volumes & Tagging 2 74
Ever wondered how to display how many visitors you have online. In this tutorial I will show you an easy but effective way to display the number of online visitors in WhizBase. In this article I assume you have read my previous articles and know …
In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…

910 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

23 Experts available now in Live!

Get 1:1 Help Now