Hey guys I am a newbie powershell guy and under normal circumstances would use the get-content command to pulll computer names. However, for this solution I only found that it can be done in vbscript. Can someone please kindly show me how I can do two things. The first is I have a text file full of computer names in a directory like c:\temp\computernames.txt I need to read from this instead of this array below.
Second thing is I need to put this info into a excel spread sheet. Please help thank you.
On Error Resume Next
Const wbemFlagReturnImmediately = &h10
Const wbemFlagForwardOnly = &h20
arrComputers = Array(".")
For Each strComputer In arrComputers
WScript.Echo "Computer: " & strComputer
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\WMI")
Set colItems = objWMIService.ExecQuery("SELECT * FROM MSNdis_CoDriverVersion", "WQL", _
wbemFlagReturnImmediately + wbemFlagForwardOnly)
For Each objItem In colItems
WScript.Echo "Active: " & objItem.Active
WScript.Echo "InstanceName: " & objItem.InstanceName
WScript.Echo "NdisCoDriverVersion: " & objItem.NdisCoDriverVersion