Loading |
VBScript |
JavaScript |
Powershell |
Search Options: List All the Local Groups a User Belongs ToContent of List All the Local Groups a User Belongs To.vbsMD5 Hash: 4795AF009CAD50FE5A2D87ADE68B3AC1 |
||
' Description: Returns a list of all the local groups on the computer atl-win2k-01 that a user named kenmyer belongs to.
strComputer = "atl-win2k-01" Set colGroups = GetObject("WinNT://" & strComputer & "") colGroups.Filter = Array("group") For Each objGroup In colGroups For Each objUser in objGroup.Members If objUser.name = "kenmyer" Then Wscript.Echo objGroup.Name End If Next Next | ||
© 2008 - 2013 Boris Toll :: Scripts available: 6.481 :: :: scriptbox.toll.at :: :: powered by www.toll.at :: |