Page 1 of 1 1
Topic Options
#81760 - 2003-07-29 02:33 PM New @office function
moatey Offline
Fresh Scripter

Registered: 2003-07-29
Posts: 8
With the ever increasing information being held about a user with Active Directory, how about some additional KiXtart functions to use this data:

To obtain AD "Office" information:
@OFFICE - could be used to map drives or install printers based on where somebody is actually based - not on group memberships etc...

@DEPARTMENT - similar to above - only different!

Cheers

Top
#81761 - 2003-07-29 02:38 PM Re: New @office function
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
It would be very handy, but difficult to get it if it isn't part of the token that comes down when the user logs on.

If it is localized to AD, then LDAP query is the way to go.

However, an integral TranslateName Fuction would work well.

code:
 
$ldap = TranslateName(1, @domain, 3, @ldomain+'\'+@userid, 1)
$UserProperties = GetObject("LDAP://"+$LDAP[0])
$FirstName = $userProperties.FirstName
$LastName = $userProperties.LastName
$Description = $userProperties.Description

With additional fields being available here:
http://www.kixtart.org/board/ultimatebb.php?ubb=get_topic;f=1;t=006213#000017

[ 29. July 2003, 14:39: Message edited by: Radimus ]
_________________________
How to ask questions the smart way <-----------> Before you ask

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 1376 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.051 seconds in which 0.025 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