vbscript security ldap sid wmi

LDAP Query based on account SID in VBscript

By Howard | Published January 9th, 2008

This is a bit of code I wish I’d found sooner. There is a – it seems mostly undocumented – feature of the ldap provider in Server 2003 that allows you to form an ldap query just on the SID of an account: bindSid = "LDAP://<sid =" & SID & ">" set oVal = GetObject(bindSid)…

Categories