[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 322
  • Last Modified:

which user id's are behind Administrator


net localgroup administrators
the above command
 gives "Administrator" as the output in xp.. which id's are behind Administrator? how can we check
0
25112
Asked:
25112
2 Solutions
 
oBdACommented:
You can do that with Sysinternals PsGetSid (http://technet.microsoft.com/en-us/sysinternals/bb897417):
psgetsid administrator

Open in new window

0
 
johnb6767Commented:
I don't follow... You are trying to translate SIDs to Account Names, or are you trying to see who the local admins are on a box?
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
25112Author Commented:
oBdA, it will be nice if we can run something that is in built in xp..
0
 
25112Author Commented:
johnb6767, i want to see who the local admins are on a box..
0
 
25112Author Commented:
ReneGe, that is brining it for a bunch of machine in a text file.. sounds good.. in this case, it is simple we just need to run something on a box..

can that script be changed to just run on a box automatically without any input or settings?
0
 
ReneGeCommented:
Absolutly.

Will execute the command to all PCs with name starting with \\PC- and \\Wrk-


@ECHO OFF

FOR /F %%G in ('NET VIEW ^| FINDSTR -i "\\PC- \\work-"') DO (
	ECHO [%%G]
	wmic /node:"%%G" path win32_groupuser where ^(groupcomponent="win32_group.name=\"administrators\",domain=\"%%G\""^)
)

PAUSE

Open in new window

0
 
25112Author Commented:
ReneGe,
when i saved your code in a .bat file and ran it, i am only getting the line:

Press any key to continue . . .

and when i click it , it is gone..
0
 
ReneGeCommented:
What do you see when you type, in a DOS window, the following command: NET VIEW
0
 
ReneGeCommented:
Also, you must change "\\PC- \\work-" with how the PC's names starts.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now