脚本专栏 
首页 > 脚本专栏 > 浏览文章

vbs列出内网的中计算机(工作组也可以)

(编辑:jimmy 日期: 2024/11/15 浏览:3 次 )
复制代码 代码如下:
'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
上一篇:VBS打开选择文件对话框代码(Win7)
下一篇:Msxml2.XMLHTTP Msxml2.ServerXMLHTTP与缓存
友情链接:杰晶网络 DDR爱好者之家 南强小屋 黑松山资源网 白云城资源网 SiteMap