Cortana, Microsoft personal digital assistant, has come a long way, right from Introduction to Windows 10 Anniversary Update which is due this summer. While Microsoft is integrating a lot of features right from Phone-PC integration to Cortana App Cards Integration with Travel, and News, one thing that is still missing is Cortana integration is support for basic features of Windows PC like Shutdown, Restart, and so on.
In this post, we will use an old technique to make Cortana shutdown, restart, log off, hibernate, sleep and lock your PC. You will be able to use voice command with Cortana, if you have a microphone configured. As a matter of fact, you can use this technique to open any program, and extend them with multiple options.
Step 1 : Enable Hey Cortana on Windows 10 PC
You can skip this if you don’t have a microphone configured or have an option for that. If you have follow the steps below:
- Click on the Cortana Search box, and then hamburger menu.
- Next click on Settings and Scroll to find out the option of “Hey Cortana”
- Turn in on. Next you can train Cortana to understand your voice, else somebody will shutdown your PC from anywhere. You also have option to use Cortana on Lock Screen.
Step 2: Setting up commands
The basic idea here is to make Cortana execute a command. This is done through the old technique of executing a shortcut. Since Cortana recognises the programs on the computer, it will also recognise the shortcut we create. So you an essentially give any name you like, but it will be cool to say “Hey Cortana, Open Shutdown”. Close enough I guess.
Lets Start with Shutdown Command, and then for rest of the commands it same. I will list the command set in the next step.
- Go to C:\Users\XXXXX\AppData\Roaming\Microsoft\Windows\Start Menu\Programs. XXXXX is the username.
- Right click inside the Programs Folder, and select “New Shortcut” option.
- The new windows that opens up has a text field. Type “shutdown.exe -s “. This will instantly shutdown your PC. If you wish to delay it by few seconds add “shutdown.exe -s -t 10”
- Name the Shortcut as “Shut Down”
Next Say “Hey Cortana” followed by “Start Shut Down”. This will initiate shutdown process.
Step 3 : List of commands you can use:
- Restart : shutdown.exe -r
- Log Off : shutdown.exe -L
- Hibernate : rundll32.exe PowrProf.dll, SetSuspendState
- Sleep : rundll32.exe powrprof.dll,SetSuspendState 0,1,0
- Lock : rundll32.exe user32.dll,LockWorkStation
That is all you need to do to get those cool commands to work with Windows 10 PC. We hope one day Microsoft can built them into Cortana, and even make it cross device so one can remotely shutdown or even restart their PC. What do you think?