Arkadaşlar Clientlerın Gpo Script ile Her Gün Akşam 18:15 De otomatik kapanmasını istiyorum
1. Create a text file, input the command and save it to c:\restart.bat.
C:\windows\system32\shutdown.exe –s –f –t 0
2. Click StartàAll ProgramsàAccessoriesàSystem ToolsàScheduled Tasks.
3. Double click Add Scheduled Task and click Next.
4. Click Browse and input c:\restart.bat.
5. Select Performance this task Daily.
6. Select Start time: 00:00 every day.
7. Input your password and click Next.
8. Click Finish.,
Yukarıdaki batch file dosyasını Gpo ya atayabilirmiyim.Yada Aşagıdaki Scripti nasıl çalıştırabılırım.Veya Elinde boyle bir script olan varmı acaba.Başka bir yol oneredebilirsiniz.
Sub Main()
strComputer = "."
'* Connect to WMI service
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate,(Shutdown)}! \\" & _
strComputer & "\root\cimv2"
'Check every 2 minutes
Set objEventSource = objWMIService.ExecNotificationQuery _
("SELECT * FROM __InstanceOperationEvent WITHIN 120 WHERE TargetInstance ISA 'Win32_Process'"
'Get the time
TimeInfo = TimeInfo & Time
'Compare the time to 8:00 P.M.
CompareTime = TimeValue("20:00:00"
If TimeInfo > CompareTime Then
Do While True
Set objEventObject = objEventSource.NextEvent()
'* If the screen saver is loaded and it is after 8:00 P.M. Shutdown.
If Right(objEventObject.TargetInstance.Name, 4) = ".scr" Then
Set colItems = objWMIService.ExecQuery("Select * from Win32_OperatingSystem"
For Each objItem In colItems
objItem.Win32Shutdown (1)
Next
End If
Loop
End If
End Sub