we reboot a remote system using the Reboot() method in the Win32_OperatingSystem classSet OpSysSet = GetObject("winmgmts:{impersonationLevel=impersonate,(RemoteShutdown)}//alexn- pc ").ExecQuery("select * from Win32_OperatingSystem where Primary=true") for each OpSys in OpSysSet OpSys.Reboot() Next
要人工关电源。我想能直接关闭电源,我该如何做?
要人工关电源。我想能直接关闭电源,我该如何做?
//////////////////////////////////////////////////////
出现这样的提示,是没有人可以帮你的,另你的那个机器是什么年代的?!建议换电源了!
GetObject("winmgmts:{impersonationLevel=impersonate,(RemoteShutdown)}//alexn-
pc ").ExecQuery("select * from Win32_OperatingSystem where Primary=true")
for each OpSys in OpSysSet
OpSys.Reboot()
Next