Page 1 of 1 1
Topic Options
#122293 - 2004-07-07 05:13 PM Getting Display Name from AD
jan Offline
Getting the hang of it

Registered: 2004-07-07
Posts: 66
Hi,

I'm trying to get the Display Name from AD, but when I try to use the command:
SHELL "dsquery user OU=KPDK,DC=Q8INT,DC=com -samid %username%|dsget user -display -q -l"

It gives an error:
"dsquery failed:`user' is an unknown parameter.
type dsquery /? for help."

If I remove "|dsget user -display -q -l", it works fine. So it must be something with the pipe it doesn't like.

When I run the command from the prompt it works fine.

Is there a better way of getting Display Name from the AD or how do I get KIX to accept the full command.

Hope someone can help me

Jan

Top
#122294 - 2004-07-07 05:23 PM Re: Getting Display Name from AD
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
The problem with your current approach is that you are missing %COMSPEC% which the pipe '|' requires. There is a FAQ on that.
Quote:

Is there a better way of getting Display Name from the AD



Yes. COM ADSI would be the way to go. There are lots of examples posted on the board.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#122295 - 2004-07-08 01:56 PM Re: Getting Display Name from AD
jan Offline
Getting the hang of it

Registered: 2004-07-07
Posts: 66
Hi,

I've tried to search and found many hints on how to use ADSI, but I can't get it to work myself. Could you please give me an example.

Thanks

Top
#122296 - 2004-07-08 02:21 PM Re: Getting Display Name from AD
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
There are many different ways to do this, so it would help if we knew why/where you are trying to do this. Are you doing it in the logon script? Are you trying to export all user's display names?
Top
#122297 - 2004-07-08 04:01 PM Re: Getting Display Name from AD
jan Offline
Getting the hang of it

Registered: 2004-07-07
Posts: 66
Hi,

It's for a loginscript where I want to insert the users fullname (displayname object in AD) and the logonname (I know how to do that) as Username and Initials in Office 2000 registry. So I only need the information for the user how are currently logs on.

Hope this is enough info

Jan

Top
#122298 - 2004-07-08 04:41 PM Re: Getting Display Name from AD
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
Does the "@FULLNAME" macro not work for you?
Top
#122299 - 2004-07-08 04:54 PM Re: Getting Display Name from AD
jan Offline
Getting the hang of it

Registered: 2004-07-07
Posts: 66
Thats was to easy!! Thanks for your quick reply
Top
#122300 - 2004-07-08 04:58 PM Re: Getting Display Name from AD
Chris S. Offline
MM club member
*****

Registered: 2002-03-18
Posts: 2368
Loc: Earth
The built-in macros are part of what makes KiXtart so powerful and easy to use.
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 1003 anonymous users online.
Newest Members
StuTheCoder, M_Moore, BeeEm, min_seow, Audio
17884 Registered Users

Generated in 0.057 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