March 12, 2014 at 9:10 pm
Comments posted to this topic are about the item Members of windows group
March 12, 2014 at 10:37 pm
Easy one, thanks.
---------------------------------------------------
"Thare are only 10 types of people in the world:
Those who understand binary, and those who don't."
March 13, 2014 at 2:28 am
free_mascot (3/12/2014)
Easy one, thanks.
+1
March 13, 2014 at 5:21 am
March 13, 2014 at 6:47 am
Wow, I never knew this existed. This is very helpful.
Be still, and know that I am God - Psalm 46:10
March 13, 2014 at 6:59 am
Good Question, I did not know about this one...
March 13, 2014 at 7:28 am
Likewise, I did not know about this option. I was surprised it works! But good to know. Thanks for the question.
March 13, 2014 at 8:01 am
Nice question, had me to do some research.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
March 13, 2014 at 8:02 am
You made my day, thanks!
March 13, 2014 at 8:07 am
Based on the wording of the question, I have to throw this out there too!
xp_cmdshell 'net localgroup administrators'
GO
xp_cmdshell 'WMIC USERACCOUNT LIST BRIEF'
GO
xp_cmdshell 'WMIC USERACCOUNT LIST FULL'
GO
Which extended stored procedure can be used to find members of a Windows group?
By that wording alone, we have multiple correct answers.
Jason...AKA CirqueDeSQLeil
_______________________________________________
I have given a name to my pain...MCM SQL Server, MVP
SQL RNNR
Posting Performance Based Questions - Gail Shaw[/url]
Learn Extended Events
March 13, 2014 at 8:22 am
SQLRNNR (3/13/2014)
Based on the wording of the question, I have to throw this out there too!
xp_cmdshell 'net localgroup administrators'
GO
xp_cmdshell 'WMIC USERACCOUNT LIST BRIEF'
GO
xp_cmdshell 'WMIC USERACCOUNT LIST FULL'
GO
Which extended stored procedure can be used to find members of a Windows group?
By that wording alone, we have multiple correct answers.
I got it right, but xp_cmdshell too can be a right answer. 😉
March 13, 2014 at 8:50 am
The call in the explanation doesn't give all memers of the group - members of a group G1 which is itself a member of a group G are automatically members of G, but will not be listed by calling xp_login 'G', 'members'. So one has to recurse down the tree to get all members of G. There was a connect item about this a while back, closed as "won't fix".
The AD Users and Computers tool has the same problem - it doesn't recurse.
So in effect there isn't any means of getting all the members of a group by a simple xp call, you have to provide the recursion yourself.. Unfortunately I misunderstood the question as asking for that, so I got it wrong.
Tom
March 13, 2014 at 10:25 am
TomThomson (3/13/2014)
The call in the explanation doesn't give all memers of the group - members of a group G1 which is itself a member of a group G are automatically members of G, but will not be listed by calling xp_login 'G', 'members'. So one has to recurse down the tree to get all members of G. There was a connect item about this a while back, closed as "won't fix".The AD Users and Computers tool has the same problem - it doesn't recurse.
So in effect there isn't any means of getting all the members of a group by a simple xp call, you have to provide the recursion yourself.. Unfortunately I misunderstood the question as asking for that, so I got it wrong.
Sometimes we can be too smart for our own good! 😉
Thanks to Yogeshwar for the question.
[font="Verdana"]Please don't go. The drones need you. They look up to you.[/font]
Connect to me on LinkedIn
March 13, 2014 at 11:33 am
SQLRNNR (3/13/2014)
Based on the wording of the question, I have to throw this out there too!
xp_cmdshell 'net localgroup administrators'
GO
xp_cmdshell 'WMIC USERACCOUNT LIST BRIEF'
GO
xp_cmdshell 'WMIC USERACCOUNT LIST FULL'
GO
Which extended stored procedure can be used to find members of a Windows group?
By that wording alone, we have multiple correct answers.
fancy an argument about using xp_cmdshell?
😀
---------------------------------------------------------------------
March 13, 2014 at 12:27 pm
nice and easy..
thanks for the question.
Viewing 15 posts - 1 through 15 (of 18 total)
You must be logged in to reply to this topic. Login to reply