Dim strComputer, s, System, item, NIC, item2
On Error Resume Next

strComputer = InputBox("Enter the computer name","Enter Computer Name")

Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set system = objWMIService.ExecQuery _
    ("SELECT * FROM Win32_ComputerSystem")
For Each item in system
	s = "Computer Info" & vbcrlf
	s = s & "***********************" & vbcrlf
	s = s & "Name: " & item.name & vbcrlf
	s = s & "Domain: " & item.Domain & vbcrlf
	s = s & "Current User: " & item.UserName & vbcrlf
Next

Set system = objWMIService.ExecQuery _
    ("SELECT * FROM Win32_OperatingSystem")
For Each item in system
	If instr(1,item.Name,"|") > 0 Then
		s = s & "OS Name: " & mid(item.Name,1,instr(1,item.Name,"|")-1) & vbcrlf
	Else
		s = s & "OS Name: " & item.Name & vbcrlf
	End If
    s = s & "Version: " & item.Version & vbcrlf
    s = s & "Service Pack: " & item.ServicePackMajorVersion _
            & "." & item.ServicePackMinorVersion & vbcrlf
Next

Set system = objWMIService.ExecQuery _
	("SELECT * FROM Win32_NetworkAdapter WHERE ConfigManagerErrorCode=0 AND (AdapterType=""Ethernet 802.3"" OR AdapterType=""Wireless"")" & _
		" AND Manufacturer != ""Microsoft""")

For Each item in system
	s = s & vbcrlf
	s = s & "NIC: " & item.name & vbcrlf
	s = s & "Connection Name: " & item.NetConnectionID & vbNewLine
	s = s & "MAC Address: " & item.MACAddress & vbNewLine
	Set NIC = objWMIService.ExecQuery _
	("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE MACAddress=""" & item.MACAddress & """")
	For Each item2 in NIC
		's = s & "MAC Address: " & item2.MACAddress & vbcrlf
		s = s & "IP Addresses:" & vbcrlf
		for i = 0 to ubound(item2.IPAddress)
			s = s & vbTab & item2.IPAddress(i) & vbcrlf
		next
		s = s & "DNS Settings:" & vbcrlf
		for i = 0 to ubound(item2.DNSServerSearchOrder)
			s = s & vbTab & item2.DNSServerSearchOrder(i) & vbcrlf
		next
		s = s & "WINS Settings: " & vbcrlf
		s = s & vbTab & item2.WINSPrimaryServer & vbcrlf
		s = s & vbTab & item2.WINSSecondaryServer & vbcrlf
	Next
Next

Set item = nothing
Set item2 = nothing
Set NIC = nothing
Set system = nothing
Set objWMIService = nothing

Wscript.Echo s