繁体   English   中英

如何根据计算机的主机名获取网络中计算机的序列号?

[英]How to get the serial no of a computer in network based on hostname of a machine ?

ComputerName = InputBox("Enter the name of the computer you wish to query")

winmgmt1 = "winmgmts:{impersonationLevel=impersonate}!//"& ComputerName &""

'WScript.Echo winmgmt1

Set SNSet = GetObject( winmgmt1 ).InstancesOf ("Win32_BIOS")

for each SN in SNSet
MsgBox "The serial number for the specified computer is: " & SN.SerialNumber
Next

由此我可以获得我的机器的序列号,但是该如何获取网络中其他计算机的序列号

确保:

  • (Windows)远程计算机上的防火墙/ DCOM设置不会阻止您的请求
  • 您具有远程计算机的凭据

可以在MSDN网站上找到更多信息和代码示例: http : //msdn.microsoft.com/zh-cn/library/aa389290%28v=vs.85%29.aspx

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM