Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Resolve GUID to friendly user name

Status
Not open for further replies.

strebor

Technical User
Nov 24, 2004
66
US
I have a vbscript that converts an nt security event log to an html document (stripping out the events that are not helpful in determining user logons and logoffs). The event log must first be saved as .csv file. Problem: In some circumstances the security event log is captured from a machine that is not live on a network and the GUIDs for the users are not resolved. Is there a way to resolve a GUID to a friendly userid (domain\userid)?
 
i found this:

' Constants for the NameTranslate object.

Const ADS_NAME_INITTYPE_GC = 3
Const ADS_NAME_TYPE_NT4 = 3
Const ADS_NAME_TYPE_GUID = 7

' Specify the NetBIOS name of the domain.

strNetBIOSDomain = "MyDomain"



' Specify the GUID name of the user.
strGUID = "GUID"

' Use the NameTranslate object to convert the NT user name to the
' Distinguished Name required for the LDAP provider.
Set objTrans = CreateObject("NameTranslate")

' Initialize NameTranslate by locating the Global Catalog.
objTrans.Init ADS_NAME_INITTYPE_GC, ""
' Use the Set method to specify the NT format of the object name.
objTrans.Set ADS_NAME_TYPE_GUID, strGUID

' Use the Get method to retrieve the GUID of the user object.
strUserNT = objTrans.Get(ADS_NAME_TYPE_NT4)

Not sure if it will work or not, not in a position to test, but the link should be useful...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top