Show all the PC in DC

来源:互联网 发布:非农数据公布网站 编辑:程序博客网 时间:2024/05/01 01:20
Set WshNetwork = WScript.CreateObject("WScript.Network")
Set PrimDomainContr = getobject("WinNT://" & wshNetwork.UserDomain)
    PrimDomainContr.filter = Array("Computer")   
    For each Computer in PrimDomainContr
      wscript.echo Computer.Name
    Next
Set PrimDomainContr = nothing
Set WshNetwork = nothing
WScript.quit
原创粉丝点击