C
Chris Sharp
The script below obtains the groups and their users on the local machine
(both local and domain accounts), but I'm trying to figure out how to
determine whether they are local or domain users. This has to run
effectively in a situation where the computer is joined to the Domain, but
the current logged-in user has logged in to the local machine.
I tried adding a '.domain' to the objGroup but it is not recognized. Thanks
much for any help.
-CPSharp
strComputer = "."
Set colGroups = GetObject("WinNT://" & strComputer & "")
colGroups.Filter = Array("group")
For Each objGroup In colGroups
Wscript.Echo objGroup.Name
For Each objUser in objGroup.Members
Wscript.Echo vbTab & objUser.Name
Next
Next
(both local and domain accounts), but I'm trying to figure out how to
determine whether they are local or domain users. This has to run
effectively in a situation where the computer is joined to the Domain, but
the current logged-in user has logged in to the local machine.
I tried adding a '.domain' to the objGroup but it is not recognized. Thanks
much for any help.
-CPSharp
strComputer = "."
Set colGroups = GetObject("WinNT://" & strComputer & "")
colGroups.Filter = Array("group")
For Each objGroup In colGroups
Wscript.Echo objGroup.Name
For Each objUser in objGroup.Members
Wscript.Echo vbTab & objUser.Name
Next
Next