Page 1 of 1 1
Topic Options
#184500 - 2008-01-10 09:33 AM ENUMGROUP for Workstations
hansh Offline
Lurker

Registered: 2008-01-08
Posts: 2
I like the functions ENUMGROUP and INGROUP very much. I use them to define which shares should be connected depending on ActDir.

It would be very nice, if the same structure could be used for workstations. Then location-dependant connections like printers can also be connected depending on ws-groups in ActDir. Until now I use a separate configuration-file, but I don't like a separate configfile if I can stick to one (ActDir)

A good idea?

Hans van der Heide

Top
#184501 - 2008-01-10 09:51 AM Re: ENUMGROUP for Workstations [Re: hansh]
Mart Moderator Offline
KiX Supporter
*****

Registered: 2002-03-27
Posts: 4673
Loc: The Netherlands
There is the InContainer UDF that can do this.
Also if the printers are specific to a location (site) you can use the @site macro.

UDF Library » InContainer() - Determines if the current account or computer is in a container
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.

Top
#184502 - 2008-01-10 10:13 AM Re: ENUMGROUP for Workstations [Re: Mart]
hansh Offline
Lurker

Registered: 2008-01-08
Posts: 2
Thanks for your reply.

The printer-stuff was just an example. As most logon info is user- and workstation-dependant I generalise and thing that these 2 functions might be useful. As a long-term KixTart user I am aware about a lot of bypasses.

Anyway, thank you for your help.

groetjes Hans

Top
#184503 - 2008-01-10 10:23 AM Re: ENUMGROUP for Workstations [Re: hansh]
Richard H. Administrator Offline
Administrator
*****

Registered: 2000-01-24
Posts: 4946
Loc: Leatherhead, Surrey, UK
Instead of requiring a specific KiXtart command to access AD information you should use generic queries.

Try the following to enumerate group membership for your workstation (make sure it is in a couple of groups)
 Code:
Break ON
$=SetOption("WrapAtEOL","ON")
 
$oADInfo=CreateObject("ADSystemInfo")
$oComputer=GetObject("LDAP://"+$oADInfo.ComputerName)
For Each $oGroup in $oComputer.GetEX("memberOf")
	$oGroup ?
Next

Top
Page 1 of 1 1


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

Who's Online
0 registered and 707 anonymous users online.
Newest Members
min_seow, Audio, Hoschi, Comet, rrosell
17881 Registered Users

Generated in 0.05 seconds in which 0.022 seconds were spent on a total of 13 queries. Zlib compression enabled.

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