I have a functioning vbscript that I would like to expand. It currently connects only to WMI. Here is an excerpt:
...For Each objComputer in colComputer
strUserName = "User Name: " & objComputer.UserName...
The resultant strUserName is always in the form 'domain\username'.
I need to remove the 'domain\' portion from strUserName.
In this modified form, strUserName matches the user's sAMAccountName in Active Directory. How do I pass the strUserName to an LDAP query that reveals the user's display name, phone number, and manager?