You can use dsquery and dsget (not sure if they are from the support
tools, or adminpak.msi) thusly:

dsquery user -samid %USERNAME% | dsget user -sid >temp.txt

You would then use FOR (hint: try "for /?" to read temp.txt file, and
put the SID into an environment variable. As the textbooks say, the
details are left as an exercise for the reader.



-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ernesto Nieto
Sent: Monday, August 15, 2005 12:38 PM
To: [email protected]
Subject: [ActiveDir] SIDs variable for batch file?

I need to create a batch file that calls upon the SID of the current
user.
Is there a variable that will give me the info if called upon?
Thanks



List info   : http://www.activedir.org/List.aspx
List FAQ    : http://www.activedir.org/ListFAQ.aspx
List archive:
http://www.mail-archive.com/activedir%40mail.activedir.org/
List info   : http://www.activedir.org/List.aspx
List FAQ    : http://www.activedir.org/ListFAQ.aspx
List archive: http://www.mail-archive.com/activedir%40mail.activedir.org/

Reply via email to