![]() I tested, and it seems that the upper value you can put in the "Display warning for X Seconds" is only 600, despite the fact you can enter up to 999 (very strange programming). When I used the -i in Windows 7, I had to fill out the box, and here was the result: I think the fact is that they simply changed the way it works, and I don't think there is any way around it 100%, but the -i now brings up a dialog box, whereas it used to bring up the screen you wanted. The closest I go with with this sample command: shutdown -i -r -t 300 I also tried changing the balloon time display so it would stay down in the systray longer, but still, even that disappears. I also experimented with the GUI interface after the -i option. I tried every combination of shutdown (-i -c -d options), but nothing. I experimented, and searched and searched, but I could not get it perfect, but I was able to come up with something. I just spent about an hour trying to make this work exactly as you wanted somehow. This means that your computer will do a normal, interruptible shutdown. Graceful Will use the graceful mode if available. Disables all UI controls and exit dialogs. ForcedLaunch: Overrides settings and starts the timer. Just add it to your PowerShell Profile and in PowerShell just run the command nextShutdownTime to see the expected shutdown time. Launch: Overrides settings and starts the timer. ![]() Sleep: Select how long you want your device to wait before going to sleep when you're not using it. Screen: Select how long you want your device to wait before turning the screen off when you're not using your device. $events = Get-WinEvent -FilterHashtable id=1074} To adjust power and sleep settings in Windows 11, select Start > Settings > System > Power & battery > Screen and sleep. I made a function for Windows PowerShell (comes with Windows 7) that does that: function nextShutdownTime So what we want is some code that gets the last 1074 event, looks up the value in the comment of the event and adds that value (in seconds) to the time the event was created, thus giving the shutdown time. ![]() Windows Logs -> System and you will see a list of system events.Īny events with an Event ID of 1074 will be a delayed shutdown. The number in the command represents time in seconds. You can change the command to shutdown /s /t 1800 to schedule a shutdown after 30 minutes. Then, type/paste the following command and hit Enter to schedule a shutdown after 5 minutes. To see this view yourself:type Event Viewer in the start menu and go to Open Windows PowerShell on your computer by searching for it in the ‘Start’ menu. Your comment of "13600" will be visible in the Event Viewer as seen in the red oval: The -c option adds a comment to the shutdown event logged by Windows Event Viewer If instead of using shutdown -s -f -t 13600
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |