To use Cortana to turn off your computer, use the following steps:
- Use Windows key + E to open File Explorer.
- Click This PC from the left pane.
- Click the View tab.
- Check the Hidden items option.
- Open the Windows installation drive (usually C:) and navigate to the following path:
UsersYourUserNameAppDataRoamingMicrosoftWindowsStart MenuPrograms
. - In the Programs folder, right-click, choose New, and click Shortcut.
- Type the following command and click Next:
shutdown.exe -s -t 00
Explanation: The command mentioned above starts Shutdown.exe, and using the -s command requires a complete shutdown, and the -t 00 button is used to set the amount of time to wait before shutting down the computer – in case This is 0 seconds.
- Name the shortcut with the voice command you want to use with Cortana. For example: ” Shutdown ” or ” Turn off PC “.
- 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.