This post was taken from mywindowshub.com
“The following tutorial will help you use Cortana to shut down your Windows 10 computer. This is a round about route where you can turn on the Shutdown.exe file by voice commanding Cortana. The steps are simple and will provide you an interesting tip!
Steps To Use A Cortana Voice Command To Shut Down Windows 10
1. Open Windows Explorer and go to the following location or simply copy and paste the path in the address bar.
(Substitute UserName by the actual username of your PC).
2. Now that you have opened the required location, right click in an empty space and go to New and select Shortcut.
3. In the address/location field copy and paste the following shutdown.exe -s -t 60 and click Next.
Here, in the above command, you will find the -t 60. This part of the command means when you ask Cortana to shutdown your machine, she’ll generate a 60 second window for you to decide if you want to cancel the shutdown process. So, if you want Cortana to shutdown the computer immediately, then remove the -t 60.
4. In the name field, type Shut Down. Always write Shut Down and never Shutdown or anything else. If you do so, then Cortana will not be able to identify the exact process. So write Shut Down and not Shutdown, turn off, Power off or anything like these.
5. Now open Cortana, or tap on the mic with Cortana. Now say “Hey Cortana” to wake up Cortana. If Cortana is already awake, say “Open Shut Down EXE”.
The window will appear and you will also find the cancel button. If you want to cancel, then tap on cancel or else, wait for the Shut Down process to turn off your computer.
If you want to restart your computer in the same way, just replace s by r.”
Thanks for the advice mywindowshub!