Steve Stewart, Senior Systems Engineer, Mob: +44 7768 267260, email: Steve....@ValeSystems.co.uk
Vale Systems, 24 High Street, Burbage, Wiltshire SN8 3AF. Tel: +44 1672 812000, www.ValeSystems.co.uk
A Partnership registered for VAT in England – Reg. No. GB 663 4662 20
On a couple of my W10 22H2 boxes Kurt, shutdown -r -t 0 works just fine from a command prompt session…
Gordon
From: ntsys...@googlegroups.com <ntsys...@googlegroups.com>
On Behalf Of Kurt Buff
Sent: Thursday, September 28, 2023 14:27
To: ntsys...@googlegroups.com
Subject: [ntsysadmin] Stupid little annoying thing
[EXTERNAL]
--
--
I used to use that command until I realized that occasionally a system didn't shutdown. Turned out some applications were holding up the reboot. You could use the /f switch but if you use /t with a value greater than 0, the /f is implied. As a result, I've used shutdown -r -t 1 for years.
I believe the shutdown command has always required a reason if you don't force it when restarting SERVERS. Windows client PCs aren't finicky about it. I remember being annoyed about it when the reason codes first debuted in 2003. I thought Microsoft lightened up on requiring them, but maybe the /f (or implied /f) bypasses the reason code requirement and I stopped noticing.
In prior versions, you could disable the Shutdown event tracker and since windows is built on top of windows with each iteration, I would expect the disabling still works. Reference:
-Lee
To view this discussion on the web visit https://groups.google.com/d/msgid/ntsysadmin/0016EC53-3A3B-4D2A-8B5B-8C6F527FDD30%40valesystems.co.uk.
To view this discussion on the web visit https://groups.google.com/d/msgid/ntsysadmin/MN2PR07MB7216CA85DD203B758473FB5FD3C1A%40MN2PR07MB7216.namprd07.prod.outlook.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ntsysadmin/MN2PR07MB7216CA85DD203B758473FB5FD3C1A%40MN2PR07MB7216.namprd07.prod.outlook.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ntsysadmin/CACE8Fwkd2bEy1qWkO2kbHFnn4W5Fq-EmsiOTO3VYTOVa8p_dtA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ntsysadmin/a3949515617b429ea848cca48f29fda7%40multiverseit.com.
My standard build has “reboot” aliased in both PS and cmd.exe as “shutdown.exe /g /f /t 0” (in versions where /g is supported and /r otherwise).
To view this discussion on the web visit https://groups.google.com/d/msgid/ntsysadmin/MN2PR07MB7216CA85DD203B758473FB5FD3C1A%40MN2PR07MB7216.namprd07.prod.outlook.com.
The command is being run in an elevated CMD or PowerShell?
Philip Elder MCTS
Senior Technical Architect
Microsoft High Availability MVP
E-mail: Phili...@mpecsinc.ca
Phone: +1 (780) 458-2028
Web: www.mpecsinc.com
Blog: blog.mpecsinc.com
Twitter: Twitter.com/MPECSInc
Skype: MPECSInc.
Please note: Although we may sometimes respond to email, text and phone calls instantly at all hours of the day, our regular business hours are 8:00 AM - 5:00 PM, Monday thru Friday.
From: ntsys...@googlegroups.com <ntsys...@googlegroups.com>
On Behalf Of Kurt Buff
To view this discussion on the web visit https://groups.google.com/d/msgid/ntsysadmin/CADy1Ce4WWmJhfU%3D_utcKA-cg-hC_CxD9spRmQCTE_z4FavZEnA%40mail.gmail.com.