Run any Command Prompt command using Cortana
Cortana may not be as popular as Microsoft hoped, but there's no denying its usefulness. This article from TipsMake will guide you on how to run any Command Prompt (CMD) command using Cortana.
In the Windows 10 Fall Creators Update, users can use Cortana to shut down, restart, lock, or log out their computer simply by saying 'Hey Cortana, shut down my computer'.
Additionally, users can use Cortana to open any program the virtual assistant finds on the Start Menu with a simple voice command. If you want to run any Command Prompt command using Cortana, refer to the article below from TipsMake.
To run any Command Prompt command using Cortana, first open File Explorer and paste the following path into the address bar:
%APPDATA%MicrosoftWindowsStart MenuPrograms
This action opens the Start Menu list of programs (where Cortana searches for shortcuts when you speak a command). Right-click anywhere in the Programs folder , select New => Shortcut .
In the window that appears on the screen, enter the Command Prompt command you want to call by voice in the " Type the location of the item" box . In this example, we use the command:
rundll32.exe powrprof.dll,SetSuspendState 0,1,0
Replace the above command with any command you want to use, then click Next .
In the next window, give the shortcut any name you want. In this example, the shortcut name is Sleep Computer .
Click Finish when you're done. You will now see the new shortcut in the Programs folder.
Above is everything you need to do to run any Command Prompt command using Cortana. From now on, to call a shortcut, you just need to say 'Hey Cortana, open [shortcut name]'. In this example, it's 'Hey Cortana, open Sleep Computer'.
Some commands in CMD require users to run CMD with administrator privileges on Windows 7, 8, 8.1, and 10 to access them. You can refer to the article on running CMD with administrator privileges that TipsMake has shared for more information.
You can not only run any Command Prompt command using Cortana, but also perform many other tasks. To better understand how to use this virtual assistant, please refer to our comprehensive guide on using Cortana on Windows 10. Good luck!