Cortana can do a whole lot in Windows 10. Voice control is really convenient, because you can do tasks in a few seconds that would normally take a half-dozen clicks. As great as Cortana is, though, you can make her do even more with a few tricks.
Once you’re set up Cortana, you can create your own custom shortcuts to shut down, log off, or restart your computer. Since she won’t do this by default, you’ll have to make a quick shortcut, but it’s a simple process."Cortana, shut down the computer""To shut down, go to Start: Power: Shut down."
I didn't ask for instructions, I told you to do it.
— Matthew Cave (@wri_matt) April 22, 2016
No matter what action you want to make a voice command for, browse to:
Once here, right-click and choose New Shortcut. In the location field, you can type a variety of commands to log off or shut down, including any of their variants. For example, to shut down your computer after a ten second delay, type this in the shortcut field:
C:\Users\<YOUR USERNAME>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs
Shutdown.exe gets the process started; the -s command tells it to shut down and the -t 10 tells it to wait ten seconds before doing so. If you’d like to add a longer delay, feel free to change that number of seconds.
shutdown.exe -s -t 10
Simply name your shortcut something easy to say (like Shut Down), and then you can say “Hey Cortana, Open (or Launch, or Start) Shut Down”. She’ll run the process and shut down the PC for you!
Here are more commands you can add. Name them just like above and you’ll have every option available!
To log off:
To put the computer to sleep:
rundll32.exe PowrProf.dll, SetSuspendState
To lock the computer:
rundll32.exe powrprof.dll,SetSuspendState 0,1,0
To abort a shutdown: