|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Is there a list of objects somewhere
I've searched through these forums before posting but was unable to find what Im looking for.
Im very new to VB, let alone scripting with VB and need some direction. Below is a script that I've managed to copy and paste from several different sources. It basically searches through a list of computers for any users that belong to the administrator or power users group. My question is, and Im not sure Im stating it correctly, where can I find a list of things that I can search for? I think Im looking for a list of objects? In other words, objgroup.name will list the names of groups on a computer. What object would I look at if I wanted to find total physical memory? objmemory.totalphysicalmemory? I know thats not correct but thats what Im looking for. Are those objects? And can I get a list of them so I know what / where to look for specific information? Sorry if the question seems stupid but Im very new to this type of scripting and Im not sure where to start. Ive got a reference book on the way. Thanks! Set objArgs = WScript.Arguments Const ForReading = 1 Set objDictionary = CreateObject("Scripting.Dictionary") Set objFSO = CreateObject("Scripting.FileSystemObject") Set objTextFile = objFSO.OpenTextFile(objArgs(0), ForReading) i = 0 Do While objTextFile.AtEndOfStream <> True strNextLine = objTextFile.Readline objDictionary.Add i, strNextLine i = i + 1 Loop For Each objItem in objDictionary StrComputer = objDictionary.Item(objItem) wscript.echo wscript.echo wscript.echo wscript.echo strComputer wscript.echo Set colGroups = GetObject("WinNT://" & strComputer & "") colGroups.Filter = Array("group") For Each objGroup In colGroups For Each objUser in objGroup.Members If objgroup.name = ("Administrators") or objgroup.name = ("Power Users") Then Wscript.Echo objuser.Name End If next next next |
![]() |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > Is there a list of objects somewhere |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|