Skip to content

Instantly share code, notes, and snippets.

@simonholm
Last active April 11, 2021 06:05
Show Gist options
  • Save simonholm/e4c689f01b1a3d71b711ad4461c2ed96 to your computer and use it in GitHub Desktop.
Save simonholm/e4c689f01b1a3d71b711ad4461c2ed96 to your computer and use it in GitHub Desktop.
note to self, alias, start powershell in WSL shell, to reboot/stop Windows
alias reboot='powershell.exe -command reboot-computer'
# my own take change the alias reboot and add force
alias restart='powershell.exe -command restart-computer -f'
alias stop='powershell.exe -command stop-computer -f'
alias reboot='runas.exe /noprofile /user:Administrator "powershell.exe -command reboot-computer"'
# HT https://github.com/microsoft/WSL/issues/2533#issuecomment-392600654
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment