Advertisement
Advertisement
| 07.08.2008 at 05:47AM PDT, ID: 23546376 |
|
[x]
Attachment Details
|
||
|
[x]
The Solution Rating System
|
||
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98: 99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: 123: 124: 125: |
If Wscript.Arguments.Named("u") <> "" And Wscript.Arguments.Named("p") <> "" Then
boolAlternate = True
strUser = WScript.Arguments.Named("u")
strPassword = WScript.Arguments.Named("p")
' WScript.Echo "Using alternate credentials..."
Else
boolAlternate = False
' WScript.Echo "Using current credentials..."
End If
If WScript.Arguments.Named("s") = "" Then
arrComputers = Array(".")
Else
arrComputers = Split(WScript.Arguments.Named("s"), ",")
End If
Const WbemAuthenticationLevelPktPrivacy = 6
On Error Resume Next
For Each strComputer In arrComputers
If boolAlternate = True Then
strNamespace = "root\cimv2"
Set objWbemLocator = CreateObject("WbemScripting.SWbemLocator")
Set objWMIService = objwbemLocator.ConnectServer _
(strComputer, strNamespace, strUser, strPassword)
objWMIService.Security_.authenticationLevel = WbemAuthenticationLevelPktPrivacy
Else
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
End If
' Get Harddrive(s) Info
Set colItems = objWMIService.ExecQuery("Select * from Win32_LogicalDisk Where Description = 'Local Fixed Disk'")
For Each objItem in colItems
WScript.Echo objItem.VolumeName
WScript.Echo objItem.Description
WScript.Echo objItem.Name
WScript.Echo objItem.DeviceID
WScript.Echo objItem.Size
Wscript.Echo objItem.FreeSpace
Wscript.Echo objItem.FileSystem
Wscript.Echo objItem.VolumeSerialNumber
Next
' Get Local Login Information
Set colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystem",,48)
For Each objItem in colItems
Wscript.Echo objItem.Caption
Wscript.Echo objItem.CurrentTimeZone
Wscript.Echo objItem.Description
Wscript.Echo objItem.Domain
Wscript.Echo objItem.Manufacturer
Wscript.Echo objItem.Model
Wscript.Echo objItem.Name
Wscript.Echo objItem.UserName
Next
' Get Bios info, includng Dell Tag, Bios Revision and Manufacturer
Set colItems = objWMIService.ExecQuery("Select * from Win32_BIOS",,48)
For Each objItem in colItems
Wscript.Echo objItem.BIOSVersion
Wscript.Echo objItem.BuildNumber
Wscript.Echo objItem.Description
Wscript.Echo objItem.Manufacturer
Wscript.Echo objItem.Name
Wscript.Echo objItem.SerialNumber
Wscript.Echo objItem.Status
Wscript.Echo objItem.Version
Next
' Get Screen Resolution, Refreash and Video Card info
Set colItems = objWMIService.ExecQuery("Select * from Win32_DisplayControllerConfiguration",,48)
For Each objItem in colItems
Wscript.Echo objItem.Description
Wscript.Echo objItem.Name
Wscript.Echo objItem.RefreshRate
Wscript.Echo objItem.VideoMode
Next
' Get Memory Information
Set colItems = objWMIService.ExecQuery("Select * from Win32_LogicalMemoryConfiguration",,48)
For Each objItem in colItems
Wscript.Echo objItem.AvailableVirtualMemory
Wscript.Echo objItem.TotalPageFileSpace
Wscript.Echo objItem.TotalPhysicalMemory
Wscript.Echo objItem.TotalVirtualMemory
Next
' Get NIC information
Set colItems = objWMIService.ExecQuery _
("Select * From Win32_NetworkAdapterConfiguration " & "Where IPEnabled = True")
For Each objItem in colItems
Wscript.Echo objItem.Caption
strDefaultIPGateway = Join(objItem.DefaultIPGateway, ",")
WScript.Echo strDefaultIPGateway
For Each objAddress in objItem.IPAddress
Wscript.Echo objAddress
Wscript.Echo objItem.MACAddress
Wscript.Echo objItem.WINSPrimaryServer
Wscript.Echo objItem.WINSSecondaryServer
Next
Next
' Get CPU Information
Set colItems = objWMIService.ExecQuery("Select * from Win32_Processor",,48)
For Each objItem in colItems
Wscript.Echo objItem.DeviceID
Wscript.Echo objItem.Caption
Wscript.Echo objItem.CurrentClockSpeed
Wscript.Echo objItem.Description
Wscript.Echo objItem.Family
Wscript.Echo objItem.LoadPercentage
Wscript.Echo objItem.Manufacturer
Wscript.Echo objItem.Name
Wscript.Echo objItem.Status
Wscript.Echo objItem.Version
Next
' Show non-functioning Devices (yellow exclamation point, Or red circle)
Set colItems = objWMIService.ExecQuery _
("Select * from Win32_PNPEntity Where ConfigManagerErrorCode <> 0")
For Each objItem in colItems
Wscript.Echo objItem.Name
Wscript.Echo objItem.Description
Wscript.Echo objItem.DeviceID
Wscript.Echo objItem.Manufacturer
Next
Next
|