Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Split escaped characters Expand / Collapse
Author
Message
Posted Tuesday, July 10, 2012 10:06 AM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Today @ 6:09 AM
Points: 433, Visits: 994
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...



Post #1327722
Posted Tuesday, July 10, 2012 10:12 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 7:21 AM
Points: 7,135, Visits: 12,749
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
Post #1327730
Posted Tuesday, July 10, 2012 12:17 PM
SSC-Addicted

SSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-AddictedSSC-Addicted

Group: General Forum Members
Last Login: Today @ 6:09 AM
Points: 433, Visits: 994
Found it.

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

P



Post #1327803
Posted Tuesday, July 10, 2012 6:15 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 7:21 AM
Points: 7,135, Visits: 12,749
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
Post #1328001
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse