>>>>oUser = GETOBJECT("WinNT://SOMEDOMAIN/someusername,User")
>>
>>>I tried this, and there was about a 20 second delay before it found the groups. I suspect it was searching the network for other servers in the domain (I used a server name for SOMEDOMAIN, was this OK?) before it returned an answer. Subsequent requests were nearly instantaneous.
>>
>>You can narrow the search for the computer by qualifying it with a domain or workgroup:
>>
>>oUser = GETOBJECT("WinNT://MYDOMAIN/MYCOMPUTER/someusername,User")
>
>Cool. Is there a way to determine what domain my computer is in? I'm writing a web app, and I can get the computer name from the system variables on the web server, but I don't know how to get the domain.
If you have the WSH, the Wscript.Network object has a Domain property; ADSI and the Win32 API also have ways to query the Domain. You may not see the expected domain in complex domain trusts, where the domain you access for resources might not be the domain that authenticates you.