Get list of users from a local group | SansSQL

Tuesday, February 25, 2014

Get list of users from a local group

This post is slightly deviating from my routine SQL scripts. :)

Here is the command to get the list of users present in a local group.
This is command shell script and the results can be directly written to a output file.

To get the list of users from local administrator group, run the below command from the command prompt.
net localgroup Administrators >C:\LocalAdministrators.txt

The same can be executed from SQL server using the xp_cmdshell extended stored procedure.
EXEC xp_cmdshell 'net localgroup Administrators'

12 comments:

Mehak Shaikh said...

dcx

Christopher said...

Search engine optimization is still utilizing Search engine marketing conducted-for-you significant-good quality internet site links positioning skilled providers find more.right here You are unable to are unsuccessful utilizing these efficient links included with organic, true and organic websites acquiring real website visitors.

Cynthia Boyd said...

It’s my fortune to go to at this blog and realize out my required stuff that is also in the quality.
UI design agency

Nicholas Olson said...

The problem is that you provide may be worth our time and also effort.
helpful resources

Mark Waji said...

It’s my first time to visit this site & I’m really surprised to see such impressive stuff out there.
website design firm

Gynecomastia Surgeon said...

Cool blog site friend I'm about to suggest this to all my listing contacts.
UX design companies

Thomas Joe said...

They were communicative and supportive design agencies throughout the entire process.

Thomas Joe said...

The team is entirely transparent, trustworthy, and pleasant to work with as a long-term development partner.
San Francisco branding

Sherry Beck said...

Their flexible project management, friendly attitude, and the combination of solid technical and creative expertise set them apart.
app design firms

Robet John said...

It’s my first time to visit this site & I’m really surprised to see such impressive stuff out there.
mobile designer

Kimberly Beckham said...

Wonderful, just what a blog it is! This blog has provided the helpful data to us continue the good work.
top web designers

Aubrey Dickey said...

I went over this website and I conceive you've got a large number of splendid information,
UI UX design firm

Post a Comment

Ads