SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Split escaped characters


Split escaped characters

Author
Message
schleep
schleep
SSCrazy
SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)

Group: General Forum Members
Points: 2631 Visits: 1405
dsquery doesn't appear to be supported on XP.

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2008, Windows Server 2008 R2

I get ...not recognized as an internal or external prog...



Orlando Colamatteo
Orlando Colamatteo
SSC-Dedicated
SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)

Group: General Forum Members
Points: 37912 Visits: 14411
I have it installed on my XP workstation and I think it came with the Admin Tools Pack. I installed it so I could easily look up AD group members from my XP workstation as it also installs the handy AD MMC snap-in ;-)

Look here for section Finding Windows Server 2003 Administration Tools Packs.

__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
schleep
schleep
SSCrazy
SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)

Group: General Forum Members
Points: 2631 Visits: 1405
Found it.

It works, although it doesn't appear to be faster than my current solution.
I'll keep at it...

P



Orlando Colamatteo
Orlando Colamatteo
SSC-Dedicated
SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)SSC-Dedicated (37K reputation)

Group: General Forum Members
Points: 37912 Visits: 14411
See if something like this is interesting to you. I get something like this, which should be easily parseable by PS:

C:\>dsquery group domainroot -limit 2 | dsget group -members | dsget user -fn -ln -email -c

Dsquery has reached the specified limit on number of results to display; use a different value for the -limit option to display more results
. fn ln email
Jane Doe jane.doe@domain.com
John Doe john.doe@domain.com
LastNameButNoFirstName LastNameButNoFirstName@domain.com
dsget succeeded


I limited the initial query to 2 so I would not bring by my entire directory.

You can also add -L to the last dsget which may result in output that is easier to parse:

C:\>dsquery group domainroot -limit 2 | dsget group -members | dsget user -fn -ln -email -c -L

Dsquery has reached the specified limit on number of results to display; use a different value for the -limit option to display more results
.fn: Jane
ln: Doe
email: jane.doe@domain.com

fn: John
ln: Doe
email: jane.doe@domain.com

fn:
ln: LastNameButNoFirstName
email: LastNameButNoFirstName@domain.com


__________________________________________________________________________________________________
There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search