Page 1 of 1 1
Topic Options
#155764 - 2006-01-22 12:18 AM InContainer question
nazgul Offline
Fresh Scripter

Registered: 2006-01-21
Posts: 11
Hello,

Ive been searching the forums a couple of hours now but I havent found an answer to my question so here goes.

lets say I have this:
if not InContainer('OU=Servers,OU=Machines,DC=ORG', 'Computer')[0]

Does that mean that it should look in my AD for an OU named Servers and then look for an OU inside that called Machines?

So that the AD would look like in this example:

ORG
-Machines(OU)
-Servers(OU)

And ofcause the last parametre states that we are looking for an Computer.

Did I get this right?

Btw Im converting some Desktop Authority to Kix scripts and is there a list of what the different validations are? Ie. /W=FOO (For adding network printers)

Thanks in advance.

Top
#155765 - 2006-01-22 03:24 AM Re: InContainer question
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I think it's the other way around. Look at how TranslateName() returns the DN.
Your DC= is incomplete.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#155766 - 2006-01-22 10:16 AM Re: InContainer question
nazgul Offline
Fresh Scripter

Registered: 2006-01-21
Posts: 11
Umm isnt it DC=foo where foo is the name of your domain controller?`
Top
#155767 - 2006-01-22 02:00 PM Re: InContainer question
nazgul Offline
Fresh Scripter

Registered: 2006-01-21
Posts: 11
lets say i have


FOO.ORG
----Department(UO)
--------Department Users(UO)

Then to check if the user is in the Department Users UO I would do this:

InContainer('OU=Department Users,OU=Department,DC=FOO,DC=ORG', 'Computer')[0]

Is this correct?

How would the check be if I wanted to check if the user or machine that is logging in is in that UO?

Thanks in advance

Top
#155768 - 2006-01-22 02:06 PM Re: InContainer question
nazgul Offline
Fresh Scripter

Registered: 2006-01-21
Posts: 11
oops Computer would have to be User in that example
Top
#155769 - 2006-01-22 02:33 PM Re: InContainer question
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Looks right.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#155770 - 2006-01-22 03:04 PM Re: InContainer question
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Take Chris' ADSI Browser out for a spin and see what DN it returns.
http://www.kixtart.org/ubbthreads/showflat.php?Cat=&Board=UBB13&Number=152335
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#155771 - 2006-01-22 03:14 PM Re: InContainer question
nazgul Offline
Fresh Scripter

Registered: 2006-01-21
Posts: 11
Im not intrested in installing different programs such as Kixforms just to get a simple question regarding parameters of a function answered. (Im working at home today so I cant run it ).
Top
#155772 - 2006-01-22 03:30 PM Re: InContainer question
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
KiXforms is a very nice program to have and I would not be worried about installing it. I too am working at home and had no problem to run it over a 26.4 dialup line.

If InContainer is not working for you, you either have your DN wrong, are using the wrong version of KiX, missing ADSI components, or missing the TranslateName() UDF that is a dependency.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#155773 - 2006-01-22 03:32 PM Re: InContainer question
nazgul Offline
Fresh Scripter

Registered: 2006-01-21
Posts: 11
Im writing it in notepad and I havent tested it yet, I just wanted to get the paremeters correct before even trying to see if it works..

Thanks

Top
#155774 - 2006-01-22 03:43 PM Re: InContainer question
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Since you are obfuscating the details, it is hard to know if you got the parms correct. I mean, in your first example, your DC was just ORG, and now it is FOO.ORG so as long as you feed us bogus info, we cannot hazard a guess.

Why not just VPN in and test?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#155775 - 2006-01-22 03:49 PM Re: InContainer question
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Quote:

Umm isnt it DC=foo where foo is the name of your domain controller?`



NO, not the domain controller.

DC is the domain.tld as in:
...,DC=domain,DC=tld
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#155776 - 2006-01-22 03:54 PM Re: InContainer question
nazgul Offline
Fresh Scripter

Registered: 2006-01-21
Posts: 11
I get it now, thanks
Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 641 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.1 seconds in which 0.061 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org