如果您有AD,且所有電腦均加入AD
或是沒有AD,但您有每台電腦的Admin密碼
那我推薦您下載GFI LANguard,就不需要在每台電腦安裝代理程式,直接掃描就可以幫您列出來每台電腦安裝的軟體、硬體配備、共用資料夾...etc
印象中,微軟有提供一套資產管理的軟體,算是免費版本,可以掃瞄內網所有電腦的安裝軟體以及更新檔案,前提是要有該電腦administrator的密碼。
或者,導入資產管理軟體,這些軟體都會有統計功能,run一下報表就出來了。
當然,一台一台看也是可以,只要權限控制的好,幾乎不會有太大變動。
有script可以辦到
1.先將下方的程式碼另存成vbs檔
2.在同目錄下在建立一個要查詢的主機名稱的清單(執行script的電腦要有權限連上被抓取的電腦),然後就會跑出一堆確定的按鈕,讓你按到爽歪歪....
3.最後就會在同目錄下產生以電腦名稱為名的純文字檔,檔案內就是安裝的軟體清單了,其中還包含了所有的更新。
<pre class="c" name="code">
Const HKEY_LOCAL_MACHINE = &H80000002
Const FOR_WRITING = 2
Const ForReading = 1
Set objFso = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("WScript.Shell")
Set oList = objFso.OpenTextFile("servers.txt",ForReading)
Do While Not oList.AtEndOfStream
strComputername = oList.ReadLine
If Left(strComputername,1) <> ";" Then
Output ("==========================================================")
If HostOnline(strComputername) = True Then
Output(strComputername)
Inventory(strComputername)
Output ("==========================================================")
Else
Output(strComputername & " is down, skipping..")
End If
End If
Loop
'==========================================================================
Function Inventory(strComputername)
On Error Resume Next
Set oTextFile = objFso.OpenTextFile(strComputername & ".txt", FOR_WRITING, TRUE)
'oTextFile.WriteLine strComputername
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputername & "\root\cimv2")
Set colOSes = objWMIService.ExecQuery("Select * from Win32_OperatingSystem")
For Each objOS in colOSes
oTextFile.WriteLine "Computer Name: " & objOS.CSName
oTextFile.WriteLine "Caption: " & objOS.Caption
oTextFile.WriteLine "Version: " & objOS.Version
oTextFile.WriteLine "Build Number: " & objOS.BuildNumber
oTextFile.WriteLine "Build Type: " & objOS.BuildType
oTextFile.WriteLine "OS Type: " & objOS.OSType
oTextFile.WriteLine "Other Type Description: " & objOS.OtherTypeDescription
oTextFile.WriteLine "Service Pack: " & objOS.ServicePackMajorVersion & "." & objOS.ServicePackMinorVersion
Next
Set colProcs = objWMIService.ExecQuery("Select * from Win32_ComputerSystem")
For Each objItem in colProcs
oTextFile.WriteLine "Number of Processors: " & objItem.NumberOfProcessors
Next
oTextFile.WriteLine vbCrLf & "Applications:"
Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputername & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall"
objReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
For Each subkey In arrSubKeys
strSubKeyPath = strKeyPath & "\" & subkey
strString = "DisplayName"
objReg.GetStringValue HKEY_LOCAL_MACHINE, strSubKeyPath, strString, strDisplayName
strString = "DisplayVersion"
objReg.GetStringValue HKEY_LOCAL_MACHINE, strSubKeyPath, strString, strDisplayVersion
strDisplayName=Trim(strDisplayName)
strDisplayVersion=Trim(strDisplayVersion)
If strDisplayName <> "" And strDisplayVersion <> "" Then
Output (strDisplayName & " " & strDisplayVersion)
oTextFile.WriteLine strDisplayName & " " & strDisplayVersion
End If
Next
objTextFile.close
End Function
Function Output(sOutput)
WScript.echo Date() & " " & Time() & vbTab & sOutput
End Function
Function HostOnline(strComputername)
Set sTempFolder = objFso.GetSpecialFolder(TEMPFOLDER)
sTempFile = objFso.GetTempName
sTempFile = sTempFolder & "\" & sTempFile
objShell.Run "cmd /c ping -n 2 -l 8 " & strComputername & ">" & sTempFile,0,True
Set oFile = objFso.GetFile(sTempFile)
set oTS = oFile.OpenAsTextStream(ForReading)
do while oTS.AtEndOfStream <> True
sReturn = oTS.ReadLine
if instr(sReturn, "Reply")>0 then
HostOnline = True
Output("Computer " & strComputername & " is alive!")
Exit Do
End If
Loop
ots.Close
oFile.delete
End Function
oList.Close
Set objReg = Nothing
Set objFso = Nothing