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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. CodeGrunt

    vbscript to get the full name of the current user

    After more research I discovered this is easier than I thought all you need is the following command: dsquery user domainroot -samid %USERNAME% You can run it from a batch file and it will return the current users first, last name and middle initial which is what I was looking for. I would still...
  2. CodeGrunt

    vbscript to get the full name of the current user

    Thanks for the reply. The original error "Object required" was on line 16: oCommand.CommandText = "<LDAP://" & domain & _ ">;(&(objectCategory=User)(UserName=" & userName & "));name;subtree" When I substitute the line you suggested: oCommand.CommandText = "<LDAP://" & domain & _...
  3. CodeGrunt

    vbscript to get the full name of the current user

    I am trying to get the full name of the current user. So far I have been able to figure out how to talk to the Active Directory server and how to get the current users login name, but I am not sure how to query the Active Directory for the users full name. Can anyone help me out? Here is my code...

Part and Inventory Search

Back
Top