Skip to main content

How to shutdown, restart, or sign-out of Windows 10 hands-free using Cortana

Cortana is perhaps one of the best features of Windows 10. You're likely to have interacted with other digital assistants, such as Apple's Siri and Google Now, but with Windows 10, you get it everywhere -- on your PC, tablet, phone, and soon, Microsoft is even working to bring the feature to Xbox One.

The coolest thing about the personal assistant is that you can use voice commands to get help on anything you need, such as find files on your device, track packages, set up appointments or new reminders, answer common questions, and much more.

However, as much as you would like to actually "ask anything" and get an instant answer or action, Cortana still limited on the things it can do. For example, you can't ask basic tasks like: "Hey Cortana: Shutdown my PC" or "Hey Cortana: Restart my PC."

But there are other ways to trick Cortana into performing such tasks. In this Windows 10 guide, we'll show you a simple trick you can use to enable Cortana to shutdown, restart, sign-out, or put your computer into a hibernate state using voice commands.

For this guide, we'll be using Cortana's ability to launch programs to trick it into executing specific commands using traditional shortcuts.

How to shutdown your Windows 10 PC using Cortana

To use Cortana to shut down your computer use the following steps:

  1. Use the Windows key + E to open File Explorer.
  2. Click This PC from the left pane.
  3. Click the View tab.
  4. Check the Hidden items option.
  5. Open the Windows installation drive (typically C:) and navigate to the following path: Users\YourUserName\AppData\Roaming\Microsoft\Windows\Start Menu\Programs.

  1. In the Programs folder, right-click, select New, and click Shortcut.
  2. Type the following command and click Next:shutdown.exe -s -t 00Explanation: The command mentioned above starts Shutdown.exe and uses the -s switch request a total shutdown and the -t 00 switch is used to set how long to wait before turning off your computer -- in this case, zero seconds.

  1. Name the shortcut with the voice command you want to use with Cortana. For example, "Shutdown" or "Turn off PC".
  2. Click Finish to complete.

Assuming that you have enabled the "Hey Cortana" feature, you can now say: "Hey Cortana: Open Shutdown" to turn off your computer hands-free.

How to use Cortana to restart your Windows 10 PC

If you want Cortana to be able to restart the computer use the following steps:

  1. While in the Programs folder, right-click, select New, and click Shortcut.
  2. Type the following command and click Next:shutdown.exe -r -t 00Explanation: The command mentioned above starts Shutdown.exe and uses the -r switch to request a full shutdown and restart of your PC, and the -t 00 switch is used to set how long to wait before rebooting your computer.

  1. Name the shortcut with the voice command you want to use with Cortana. E.g, "Restart" or "Reboot PC".
  2. Click Finish to complete.

Now you can invoke the command: "Hey Cortana: Open Restart" or use the name you used in the shortcut, and your computer should begin the restart process.

How to use Cortana to hibernate your Windows 10 PC

You can also use Cortana to put your Windows 10 PC in the hibernation state with the following steps:

  1. While in the Programs folder, right-click, select New, and click Shortcut.
  2. Type the following command and click Next:shutdown.exe -hExplanation: The command mentioned above starts Shutdown.exe and uses the -h switch to perform a hibernation request. However, keep in mind that your computer must have hibernation enabled to work. You can learn more on how to use hibernation on Windows 10 here.

  1. Name the shortcut with the voice command you want to use with Cortana. E.g, "Hibernate".
  2. Click Finish to complete.

Once you finish creating the shortcut, you can invoke the new command saying: "Hey Cortana: Open Hibernate."

How to use Cortana to sign-out of your Windows 10 account

Additionally, you can use Cortana to sign out of your account with the following steps:

  1. While in the Programs folder, right-click, select New, and click Shortcut.
  2. Type the following command and click Next:shutdown.exe -lExplanation: The command mentioned above starts Shutdown.exe and uses the -l switch to request a logoff action.

  1. Name the shortcut with the voice command you want to use with Cortana. For example, "Sign out".
  2. Click Finish to complete.

Similar to the previous command, you can now say: "Hey Cortana: Open Sign out" to log off of your Windows 10.

Extra

After creating the new shortcuts in the Start menu Programs folder, you will see four new application entries in the All apps list. You can add more styles to make the new entries more identifiable:

  1. While in the Programs folder, right-click the Shutdown shortcut, and click Properties.
  2. In the Shortcut tab, click the Change Icon button.

  1. If you get a warning, just click OK.
  2. Select the appropriate icon and click OK.Note: If you don't see any icon listed, then copy and paste this path: %SystemRoot%\system32\shell32.dll and click Enter, and you should now see the list of icons.

  1. Click Apply.
  2. Click OK.
  3. Repeat these steps for each shortcut.

Wrapping things up

The only caveat with the method is that you must say the word "Open" on every command, but it's a small price to pay for the new actions Cortana can do for you.

Keep in mind that Microsoft is also working on the Windows 10 Anniversary Update, which will include a lot of new features and enhancements. In particular, the software giant is planning to add various improvements to Cortana that could also include new power-related voice commands, as we have caught a glimpse of the feature during the Microsoft Build 2016 developer conference. In the meantime, you can use this handy trick to sign-out, restart, hibernate, or shutdown your computer hands-free.

More on Windows 10

For more help articles, coverage, and answers on Windows 10, you can visit the following resources:

Mauro Huculak is technical writer for WindowsCentral.com. His primary focus is to write comprehensive how-tos to help users get the most out of Windows 10 and its many related technologies. He has an IT background with professional certifications from Microsoft, Cisco, and CompTIA, and he's a recognized member of the Microsoft MVP community.

56 Comments
  • .....
  • Why can't it just be simple? Hey Cortana restart.....
  • My guess is so people can't walk into a room full of computers and shout the command, inducing untold rage.
  • I do believe you're on the right track with that. I get frustrated enough if i have my phone nearby and my Mic enabled and say "hey Cortana" then both respond. I really need to get that software that lets you rename her.
  • Yes that is annoying and yes something as simple as being able to rename her would pretty much fix that issue
  • Ya, when I say it my laptop, desktop, phone and xbox go off
  • I understand the multiple devices responding scenario but if it can be enabled through this command gobbledygook thing then why not just offer the option in settings?
  • Like the gamer who used the GamerTag "Xbox_Off" and would troll people into shouting his name in rage when engaging in multiplayer games... :D
  • Finally. I searched a lot about this but didnt find. Thanks Windows central
  • A better command that also works is, "Hey Cortana: Start Shutdown process". You just have to rename the shortcut to "Shutdown Process". And use the words Start instead of open. They both do the same thing. - Posted via W10M
  • Had a same idea ;-)
  • Can you do something like this to ease out the "next desktop background" option on desktop to change the desktop image.
  • Is there any thing to volume up and down. Screen brightness etc.
  • Cool
  • You shouldn't have to go through all that. It should be a built in command already
  • Agreed. On Microsoft defences, during Build 2016, on one of the video the company played at one instance you can get a glimpse of "Cortana shut down my PC". I'm 100% sure, but we might see a similar feature in the future. Thanks,
  • I think it will once Cortana comes to Xbox as being able to turn it on and off with touching the box or controller is one of the things I love about it.
  • I agree that would be more convenient but I can't name one other operating system that can do this(unless I'm totally out of touch with modern operating systems) other than the Xbox One which is built upon  Windows 10.
  • I'll be shouting and shutting down any computer I walk by. Hehe! I guess this would be the reason it is not built in. - Posted via W10M
  • Agree DaveGx
  • This is the type of flexibility that having a complete operating system allows. Can't do something like this on an iPad Pro if you wanted to.
    Good article. Posted from Windows Central for Windows 10
  • Now, how to turn on the Windows machine using Cortana?! That is the question!
  • Yes! Voice authorization codes, like what they use on Star Trek, could be fun. Perhaps pair a code system with some kind of voice biometric authentication and implement it similarly to Hello, Picture Password, and PIN.
  • With always listening enabled, phones can wake up from sleep with Hey Cortana command. I believe Surface Pro 3/4 can as well. - Posted via W10M
  • If it can be done on the Xbox, it's something that can be done on the PC. It just can't truly shut completely down and must have the Mic always listening.
  • I should be able to shutdown my PC from my phone by saying those commands. Suggested that feature in the feedback app ages ago. Posted from Windows Central app on Windows 10 Mobile
  • I'm about to go look for that and upvote it. I would love to use my Phone as a "Mic" for my PC as far as commands go. It'd be awesome if you could do it outside of your home network too.
  • I realized that I only made the suggestion via the Feedback app on PC and not mobile also. Here's the link to it still: Windows-Feedback:?contextid=14&feedbackid=e81f9dd2-4112-45f5-acb7-e6ad2812aa5f&form=1&src=2
  • Check out VoiceWake. It does exactly this and has been recently updated to a uwp
  • I never use Cortana because I have both a windows phone and a windows PC, and when I summon Cortana both devices compete with each other and then I have to straighten that out. Many of these cool features don't work when they're not setup properly.
  • Um, you know you can disable Hey Cortana on either of those devices, right?
  • Yeah, but the devices should be smarter than that, I have the same issue. I recognize it is a difficult problem to solve, but one worth some effort if we are going to achieve the kind of digital AI presence we will be comparing to (see Star Trek reference above)
  • ...but the devices should be smarter than that... How?!
  • They honestly should build in the ability to use seperate commands. I should be able to say "Hey PC" or something. I know software exists to do that, but it'd be good to have it built in.
  • You can get software that allws you to change what name she responds to. Theres an article about it somewhere on WC, I've been too lazy to find it and download it myself lol. I just keep my phone in my pocket when I don't want it freaking out.
  • overcomplicating it. Its simple. When on same wifi network/blutoothed to pc only listen to pc. or send instruction to pc. same name no problem
  • Not really a great solution. Bluetooth and WiFi work throughout a house. Hell, I can be connected to my car if I'm on my couch. That would cause a lot more problems than it's worth.
  • LOL. True. - Posted via W10M
  • Nice. Thank you.
  • Hahahaha
  • What's Cortana?
  • Bing it!
  • I did. Not available on my region was the answer. My W10 has language set as en-us. What's wrong?
  • Great tips Windows Central. Thank you.
  • And what about Sleep?
  • At least 7 hours per night is recommended but 8 if you're stressed :/
  • Haha ....@2tomtom it's very funny... But I was taking about that feature PCs have. Just like Hibernate...
  • But guys, this feature is coming officially with the Anniversary Update this spring (Late May/Early June)..  http://www.lowyat.net/wp-content/uploads/2016/03/Cortana-Voice-Shut-Down.jpg
  • That's exactly what I was trying to refer to at the end of the article. :-) Thanks,
  • Haven't they brought some of this natively in the most recent insider builds?
  • I used to use batch files to do things like this from the command line in 1986.
  • Maruo!!!!!!!!!!!!!!!
  • This feature should be added to the phone since we don't have a way to simply restart our phones
  • Huh, this sounds familiar :P.
  • There is a problem with the instructions for the first part after the first image that shows the final folder, there is no instruction to "right click" as there is for the "restart" option setup and "hibernation" option, if you know what I mean then someone point it out to the author of this piece.
  • That beautiful...¿XP icons? another mistake in Windows 10, old icons, old w98 interface, duplicate options like Control Panel or Windows Media Player (still? seriously?), old programs without being redesign like Notepad, Paint, Remote Desktop... It obscures the good work done at W10 =(