Page 1 of 1 1
Topic Options
#145998 - 2005-08-19 06:51 PM How do you limit script to specific sites in AD using GPO
fitz1925 Offline
Lurker

Registered: 2005-08-19
Posts: 4
I am trying to limit the script from running for users when they use terminal services on remote servers.
Top
#145999 - 2005-08-19 06:55 PM Re: How do you limit script to specific sites in AD using GPO
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
How about testing the @TsSesion macro to exit early on ? See docs/chm for further information.
Top
#146000 - 2005-08-19 07:07 PM Re: How do you limit script to specific sites in AD using GPO
fitz1925 Offline
Lurker

Registered: 2005-08-19
Posts: 4
Sorry, what I really want is to limit the script from running at only one site when logging in. Currently when the users in the OU log in at any of the AD sites the script runs. I want to have it apply to only one site.
Top
#146001 - 2005-08-19 07:29 PM Re: How do you limit script to specific sites in AD using GPO
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
It is difficult to provide you a logical solution with only the sketchy problem descritption you provided. If you provide a more detailed description of your site/OU hierarchy and your current implementation, then we may be able to give you better answers.

How have you configured your users to execute the logon script?

Do you want all users to execute some script?

In what specfic cases do you not want the script to execute?

What is wrong with the script starting to execute and then terminating?
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#146002 - 2005-08-19 08:01 PM Re: How do you limit script to specific sites in AD using GPO
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11628
Loc: CA
Well at the very beginning of the script you can look for the names of the servers and quit the script if it matches.

If you don't even want KiXtart to fire up then you'd have to use a batch file that determines specific criteria in advance.

Top
#146003 - 2005-08-19 08:15 PM Re: How do you limit script to specific sites in AD using GPO
fitz1925 Offline
Lurker

Registered: 2005-08-19
Posts: 4
The environment is 2003 AD. We have several AD sites. The users are in one OU and the script is linked by GPO with the script logon. In the script logon is a .bat that points to the kix script in the netlogon folder.

What I want it to do is not run at all if the user is logging on to any computer outside of my AD site.

Top
#146004 - 2005-08-19 09:37 PM Re: How do you limit script to specific sites in AD using GPO
maciep Offline
Korg Regular
*****

Registered: 2002-06-14
Posts: 947
Loc: Pittsburgh
@Site?
Top
#146005 - 2005-08-19 09:53 PM Re: How do you limit script to specific sites in AD using GPO
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
You have ask two different questions:

trying to limit the script from running for users when they use terminal services on remote servers

&

I want it to do is not run at all if the user is logging on to any computer outside of my AD site

Different objectives?

From what you write, I see all users are in a single OU. I see computer account may or may not be in separate OUS. This is not clear from your posts.

You stated you have different sites. These are defined by IP and have nothing to do with OUs.

You could move your users into OUs based on site then only execute the logon script for that OU.
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#146006 - 2005-08-19 09:53 PM Re: How do you limit script to specific sites in AD using GPO
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
Would something like this help?

Code:

$objSys = CreateObject("ADSystemInfo")

If @ERROR Exit 1 EndIf

$objSys.ComputerName ?

If InStr($objSys.ComputerName,'dc=my,dc=domain,dc=com)
"Run my script." ?
EndIf


Top
#146007 - 2005-08-19 10:12 PM Re: How do you limit script to specific sites in AD using GPO
fitz1925 Offline
Lurker

Registered: 2005-08-19
Posts: 4
I have 1 OU for users and several different sites. The users log in at several sites but currently when they log in at any site the script runs. I want the script to only run when they log in at one specific site. I can not change the OU setup for the users due to the acess they need.
Top
#146008 - 2005-08-19 10:29 PM Re: How do you limit script to specific sites in AD using GPO
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
As stated in other posts. I can not see any way to accomplish what you want. The solution I would implement would execute a base script for all users. It then would check the @site macro and conditionally execute the script for that site.
_________________________
Home page: http://www.kixhelp.com/hb/

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 (Allen) and 1198 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.15 seconds in which 0.114 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