Get OS Group membership
From: CC&JM (CCJM_at_discussions.microsoft.com)
Date: 02/11/05
- Next message: Bruce de Freitas: "Copy to SQL2000 made command slow?"
- Previous message: Bruce de Freitas: "Attaching Databases"
- Next in thread: Sue Hoegemeier: "Re: Get OS Group membership"
- Reply: Sue Hoegemeier: "Re: Get OS Group membership"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 11 Feb 2005 09:53:03 -0800
Hello,
Im using the 'xp_cmdshell' to know all users that belong to the local
administrators group and i'm using the 'net use localgroup' to get the output
into my report.
Here is the code and the Output:
set nocount on
exec xp_cmdshell 'net use localgroup'
go
set nocount off
OUTPUT:
output
------------------------------------
Alias name administrators
Comment Administrators have..
NULL
Members
NULL
------------------------------------
Administrator
DOMAINXXX\Domain Admins
DOMAINXXX\usera
DOMAINXXX\userb
The command completed successfully.
NULL
NULL
Is there any way to avoid lines where appear:
output
------------------------------------
Alias name administrators
Comment Administrators have..
NULL
and all the information that is not part of the group membership?
Do you know other way to get this information?
Thanks,
Best regards
- Next message: Bruce de Freitas: "Copy to SQL2000 made command slow?"
- Previous message: Bruce de Freitas: "Attaching Databases"
- Next in thread: Sue Hoegemeier: "Re: Get OS Group membership"
- Reply: Sue Hoegemeier: "Re: Get OS Group membership"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|