Wednesday, December 20, 2023

Rebooting a remote windows computer

 The best way to remotely reboot a Windows system is:
1. Open Windows PowerShell ISE


2. Find the "Restart-Computer" command.



3. Click "Show Details"



4. Now enter in the information for the computer you want to reboot. Generally it is a good idea to check "Force". "ComputerName" can be an IP. If the computer is on a domain, make sure to set the credentials field to a "MYDOMAIN\myuser" format.


5. Click "Run"


Now this will show you the PowerShell command that is generated by ISE. It should prompt you for your password for the given user if all goes well.

You can actually use this to make your own .ps script.


Extras:

If you get an error about "System shutdown is in progress" - wait a bit. It may be Windows Update. If it still fails, download SysInternals Suite and try this command:

pskill -u joey  \\192.168.0.11 winlogin

pskill is a SysInternals Suite command, so make sure you're in that directory.

Cygwin with the new Windows Terminal

Windows Terminal is a new slick looking terminal for Windows. Here is how to get Cygwin added to it. 1. Install it from Microsoft. https:/...