"Members Of" for a User Account 
Author Message
 "Members Of" for a User Account

I need to enumerate the Members Of for a user account on
a local machine. This server is located in a DMZ with
NetBIOS disabled. LDAP queries do not work. Is there any
way to script this type of query? I haven't been able to
user the WinNT provider to access this info.
Thanks


Sat, 06 Nov 2004 02:12:48 GMT  
 "Members Of" for a User Account

Quote:

> I need to enumerate the Members Of for a user account on
> a local machine. This server is located in a DMZ with
> NetBIOS disabled. LDAP queries do not work. Is there any
> way to script this type of query? I haven't been able to
> user the WinNT provider to access this info.

Hi

Set oNetwork = CreateObject("WScript.Network")
sUserName = oNetwork.UserName

'the . is for local computer
Set oUser = GetObject("WinNT://./" & sUserName & ",user")

For Each oGroup In oUser.Groups
  WScript.Echo oGroup.Name
Next

--
torgeir



Sat, 06 Nov 2004 04:42:44 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. adding user account to "Users" container

2. Error "Member not found"

3. adding users to "Users" container

4. Disabling "BACK"/"FORWARD" buttons

5. CreateObject("Excel","//server"), MsgBox output

6. Problem With "window.showmodaldialog("")"

7. Disabling "BACK"/"FORWARD" buttons

8. "add users and groups" interface

9. "add users and groups" interface

10. "Shared" User Profiles

11. Check "LOGON" Users

12. .Filter = Array("User")

 

 
Powered by phpBB® Forum Software