1. In the Programs folder, right-click, select New, and click Shortcut.
2. Type the following shutdown.exe -l command and click Next :
Explanation: The command mentioned above starts Shutdown.exe and uses the -l switch to request a logout action.
3. Name the voice command shortcut that you want to use with Cortana. Example: “ Sign out “.
4. Click Finish to finish.
Similar to the previous command, you can now say: “ Hey Cortana: Open Sign out ” to sign out of your Windows 10.