Use Cortana to Restart, Log Off, Hibernate, Shutdown, Sleep, Lock Windows 10 computer

When Cortana made its debut on Windows 10 PCs, it generated much enthusiasm among Windows loyalists. It was touted as more than a simple search feature. The digital voice assistant helped make things simpler. However, one feature that largely remained out of the requests by users was ability of Cortana to be able to shut down computers. This article covers this shortcoming of Cortana. and shows readers how they can use Cortana to restart, log off, hibernate, sleep, lock or shutdown their Windows 10 PC, by creating shutdown, restart, log off shortcuts.

restart-shutdown-cortana

UPDATE: Starting with the Windows 10 Fall Creators Update, you can shut down, restart, or sleep your PC simply by saying any of these:

  • Hey Cortana, lock my computer
  • Hey Cortana, shut down my computer
  • Hey Cortana, restart my computer.

Shut down Windows 10 using Cortana

Having set up Cortana, open Windows File Explorer and navigate to the following location:

C:\Users\<username>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs

Now you have to create a shortcut here. So, right-click inside this Programs folder and select the New Shortcut option.

In the location field that appears on the computer screen, type the following:

shutdown.exe -s -t 10

This will initiate the shut down process after 10 seconds.

If you wish to shut down right away, simply use:

shutdown.exe -s

Name the Shortcut Shut Down.

Once you are done with creating the shortcut, say Hey Cortana and then say, Open Shut Down. You can use Open, Start  or Launch voice commands.

Following this action, you’ll see Windows initiate the shut down process.

Use Cortana to Restart Windows 10

If you would like to restart your Windows 10 computer using Cortana, you can use this command –

shutdown.exe -r

and name it as Restart.

Now say Hey Cortana and then Open Restart. Again, here too you can use Open or even Start or Launch voice commands.

You PC will restart.

Log off Windows 10 using Cortana

If you would like to log off your Windows 10 computer using Cortana, you can use this command –

shutdown.exe -L

and name it as Log Off.

Now say Hey Cortana and then Open Log Off. Here too you can use Open or even Start or Launch voice commands.

Hibernate using Cortana

To Hibernate your computer, use the following command to create a shortcut and name it Hibernate:

rundll32.exe PowrProf.dll, SetSuspendState

Then say Hey Cortana and then Open Hibernate.

Sleep computer using Cortana

To Hibernate your computer, use the following command to create a shortcut to Sleep your Windows computer, and name it Sleep:

rundll32.exe powrprof.dll,SetSuspendState 0,1,0

Now say Hey Cortana and then Open Sleep.

If something does not work for you, open CMD and run powercgf -a and see if your computer supports that power state.

Lock computer using Cortana

To Lock your computer, use the following command to create a shortcut to lock your Windows computer, and name it Lock:

rundll32.exe user32.dll,LockWorkStation

Now say Hey Cortana and then Open Lock.

You can also add other new voice commands to Cortana with Cortanium app.

More Cortana Tips & Tricks here.

Posted by on , in Category Windows with Tags
Anand Khanse is the Admin of TheWindowsClub.com, a 10-year Microsoft MVP Awardee in Windows (2006-16) & a Windows Insider MVP. Please read the entire post & the comments first, create a System Restore Point before making any changes to your system & be careful about any 3rd-party offers while installing freeware.

9 Comments

  1. MmeMoxie

    Just a question – What can you do with Cortana, when shutting down, there is a program that will not close? Is there a command to help with that issue? I know with Windows 7 Pro, this happens frequently. It doesn’t take long for the program to end, but, on occasion I have had to use Task Manager, to end the offender. Thanks Andy. 🙂

  2. It is better to let Windows shut down the process normally, instead of using another command/parameter to force shut it down. 🙂

  3. Aprianto Nursetiawan

    What about sleep? It’s the most important, and the help for shutdown.exe doesn’t cover how to do sleep.

  4. Aprianto Nursetiawan

    Mm not working, PC just went straight into hibernate instead of sleep.

  5. deepdvd

    I wish this actually worked on the latest insider version. I’m on build 14383 (soon to be 14385) and it doesn’t work. Cortana just searches for “Open Hibernate” or “Open Lock” instead of the shortcut.

  6. avinash singh

    How can I use cortana to unlock my computer? I want to use Cortana as a biometric lock so that my computer unlocks only with my voice command

  7. PapaRimsky

    I followed all the steps, but this did not work for my Windows 10 Pro x64. Version 17.03. Build 15063.296.
    Cortana simply opens Bing and tries to find ‘Open shutdown.’ I tried a couple times and used the correct path, and I manually typed in the code and even copy-pasted it, and the solution did not work.
    🙁

Leave a Reply

Your email address will not be published. Required fields are marked *


5 + 8 =