list users

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi all,
I want to get a list of the users of a system that are not being created
by default.
The users that are added after.
There is a way to do this?
I thougt to use the lengt of the sid, because all the new accounts have
the last number bigger than 1000.
But I can't the length in bytes of the sids to compare, the vbs that I
made get me an error, the code is:

strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2")
Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_SID")
For Each objItem In colItems
WScript.Echo "User Name: " & objItem.SidLength
Next

I'm new on scripting so I thing I'm doing a basic question error, but
don't know which is.

Anyone knows how can I list the users or get the sidlenght for making a
comparation?
Thanks
.



Relevant Pages

  • Re: Check Permission On File/Folder For a Given User
    ... >> then compare it with the SID in the list of ACE in DACL for the ... >> ACEs in DACL, rather the SID of the group he belongs to. ... >> Instead of going through the groups the user is member of to compare the ...
    (microsoft.public.dotnet.security)
  • Re: Check SID for GROUP membership
    ... elif PrimSID memberof SecondSID ... But you ask that you seek a way to compare SID, ...
    (microsoft.public.win2000.security)
  • Re: Cannot access NT 4 domain after user accounts migration
    ... Their old SID is stored in an attribute called sIDHistory, ... You need to compare the sIDHistory attribute against ... > the source SID. ...
    (microsoft.public.windows.server.active_directory)
  • Re: Cannot access NT 4 domain after user accounts migration
    ... I have to migrate global group before user accounts. ... "Alex" wrote: ... Their old SID is stored in an attribute called sIDHistory, ... You need to compare the sIDHistory attribute against ...
    (microsoft.public.windows.server.active_directory)