vbs列出内网的中计算机(工作组也可以)
程序员文章站
2022-07-04 20:33:06
复制代码 代码如下: 'handle errors on error resume next 'get the provider object set prov = get...
复制代码 代码如下:
'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实现将字符串写入剪切板的实现代码
下一篇: 每次洗完澡我都好像涅槃重生一样