This article explains four ways to schedule a specific, automatic shutdown time for your PC. We'll also provide information on how to stop a scheduled shutdown.
How to Set Your PC's Automatic Shutdown Timer in Windows 10 | Windows Tutorial
To use the Command Prompt for a one-time shutdown, follow these steps.
Type CMD in the Windows search box and press Enter to open the command prompt.
In the command prompt window, type shutdown -s -t and the number of seconds you want. Here's an example: