remote wakeonlan fix for TeamViewer with net rpc
Remote wakeonlan fix for TeamViewer using net rpc
references: [https://www.hackingarticles.in/active-directory-enumeration-net-rpc/]
1. Wake the hardware (from Mac)
Check local ARP cache for MAC if needed (ping hostname to get IP), then:
arp -a
brew install wakeonlan
wakeonlan <mac address>
ping <IP address>
2. Connect to a linux jump box & install tool if missing. (Ubuntu box)
ssh user@<IP address>
sudo apt install samba-common-bin -y
3. Check / start service (from jump box)
net rpc service start TeamViewer -I <IP address> -U <username> -W <domain name>
to stop service:
net rpc service stop TeamViewer -I <IP address> -U <username> -W <domain name>
4. Force reboot (if service is “Stop Pending” or frozen)
net rpc shutdown -r -f -I <IP address> -U <username> -W <domain name>
5. Confirm recovery
ping <IP address>
6. Troubleshooting
If you see: (WERR_SERVICE_ALREADY_RUNNING), stop the service with Step 3 “stop” command.
If you’re stuck reboot the whole machine with Step 4 forced reboot.