るいすのブログ

オタクエンジニアの雑記

CentOS7/UbuntuからWindows10のPCをリモートシャットダウンしてみる


Windows側

  1. 管理者権限+パスワード設定がしているアカウントを作成する(既にある場合はスキップ)
  2. TCP:445, 139 を開ける

Linux側

  1. コマンドを入れる Debian系:apt install samba-common RHEL系:yum install samba
  2. 実行する net rpc shutdown -I ipaddress -U "username%password" -f -t 0 -C "Shutdown"