欢迎来到图者知识网!

工作组中找不到计算机,vbs如何提取计算机名

计算机类 时间:2022-12-28

【www.tuzhexing.com--计算机类】


"Handle Errors
On Error Resume Next
"Get the provider object
Set prov = GetObject("WinNT:")

"Examine the available domains the provider can reach
For each dom in prov

"Examine the objects in the domain and check for Computer objects
For each o in dom
If o.Class = "Computer" Then

"Display properties of the Computer
WScript.Echo o.Class & " " & o.Name
WScript.Echo " Owner: " & o.Owner
WScript.Echo " Division: " & o.Division
WScript.Echo " OperatingSystem: " & o.OperatingSystem
WScript.Echo " OS Version: " & o.OperatingSystemVersion
WScript.Echo " Processor: " & o.Processor
WScript.Echo " ProcessorCount: " & o.ProcessorCount

End If

Next
Next

本文来源:http://www.tuzhexing.com/kaoshi/1234308/

推荐内容