Networkümüzde gerekli haklarımız tanımlanmışsa uzak bir makineyi kapatabilir,restart yada logoff edebiliriz.Bruce Walton ‘ın hazırladığı script:
———————
msg=”Yapmak istediginiz islemi seciniz:” & vbcrlf & “0 – Log off” & vbcrlf & _
“1 – Shutdown” & vbcrlf & “2 – Reboot” & vbcrlf & “8 – Power Off”
flag=inputbox(msg)
if flag<>0 and flag<>1 and flag<>2 and flag<>8 then
msgbox “Incorrect selection”
wscript.quit
end if
Servers=array(“computer1″, “computer2″, “computer3″)
for x=lbound(servers) to ubound(servers)
for each OS in getobject (“winmgmts:{(Shutdown)}//” & servers(x) & _
“/root/cimv2″).InstancesOf(“Win32_OperatingSystem”)
set Security = OS.Security_
set PrivObj = Security.Privileges
PrivObj.Add(18)
RetVal = OS.Win32ShutDown(flag,0)
next
if RetVal = 0 then
wscript.echo “Shutdown ” & servers(x)
else
wscript.echo “Unable to shutdown ” & servers(x)
end if
next

bu script ti tam olarak ağ içinde nasıl kullanacağız?
Link | Mayıs 8th, 2007 at 12:57
Yukarıdaki scripti notdefterine alıp script.vbs şeklinde kaydederek uygulama yapabilirsiniz.
Link | Mayıs 8th, 2007 at 13:43
script.vbs olarak kaydedildiğinde hata veriyor.
Link | Ağustos 9th, 2007 at 12:50