当前位置:编程学习 > 网站相关 >>

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

vbs小铺

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

补充:综合编程 , 安全编程 ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,