Page 1 of 1 1
Topic Options
#136812 - 2005-03-30 10:10 PM Stupid question
Clayton Offline
Fresh Scripter

Registered: 2002-08-19
Posts: 29
Loc: Tampa, FL
Sorry I know this is a stupid/silly question but I'm having an elderly moment and can't remember how/if this can be done.

I want to run different scripts for differnt OU's.
I'm using a udf in the beginning of my script.


If InContainer('ou=OFF,dc=domain,dc=com','User')[0]
can I now use "call %logonserver%\netlogon\scriptname ??

or will a Call command not work?

Top
#136813 - 2005-03-30 10:15 PM Re: Stupid question
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Don't see why not.
If a user is in the OU call somescript.kix if he/she is in an other OU call someotherscript.kix and so on for all required OU's. Or if it's a logon script set the logon script by using GPO and point to a different script for the different OU's.
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#136814 - 2005-03-30 10:54 PM Re: Stupid question
Clayton Offline
Fresh Scripter

Registered: 2002-08-19
Posts: 29
Loc: Tampa, FL
Code:
Break on

Call "\\tpaprime\netlogon\udf.kix"

If InContainer('OU=TPA,dc=mfmlegal,dc=com','User')[0]
Call "\\tpaprime\netlogon\tpalogin.kix"
EndIf

If InContainer('ou=CLW,dc=mfmlegal,dc=com','User')[0]
Call "\\clwprime\netlogon\clwlogin.kix"
EndIf



I thought the call command would work but it's being hard headed for me....

There is a tab in front of the call commands. The formatting isn't holding after I post.


[edit]
lonkero added the missing code-tags


Edited by Lonkero (2005-03-30 11:01 PM)

Top
#136815 - 2005-03-30 11:02 PM Re: Stupid question
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
so, basically I would ask you what means being hard headed.
if it's not working, how it's not workin?
_________________________
!

download KiXnet

Top
#136816 - 2005-03-30 11:21 PM Re: Stupid question
Clayton Offline
Fresh Scripter

Registered: 2002-08-19
Posts: 29
Loc: Tampa, FL
OK the tpalogin or clwlogin does not run.. They do however run if I run them via GP or call them from a bat file.

What did you change in the code?

Top
#136817 - 2005-03-30 11:34 PM Re: Stupid question
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
Sounds like the incontainer UDF is not working properly in your script.
Maybe you can do this to check if the incontainer udf runs properly.

Code:

$rc= InContainer('OU=TPA,dc=mfmlegal,dc=com','User')[0]
?$rc
sleep 5



this way you can see if the incontainer udf returns something and what it is.



PS, if you want to post code please put it between the code tags (in te list below the textfield when posting).


Edited by R2D2 (2005-03-30 11:35 PM)
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#136818 - 2005-03-30 11:39 PM Re: Stupid question
Clayton Offline
Fresh Scripter

Registered: 2002-08-19
Posts: 29
Loc: Tampa, FL
Thanks I'll try that.
sorry about the code posting...

Top
#136819 - 2005-03-30 11:43 PM Re: Stupid question
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Once you are sure your InContainer() parms are right, try useing the domain name in the path.

Call "\\mfmlegal.com\netlogon\clwlogin.kix"
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

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
1 registered (StuTheCoder) and 798 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.057 seconds in which 0.024 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