0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

iOSショートカットからWindowsをシャットダウンする

Posted at

前提

  • WindowsPCのローカルIPアドレスが固定になっている

OpenSSHサーバーをインストール

  1. 設定の「オプション機能の管理」から「OpenSSHサーバー」を追加する
  2. 管理者権限のPowershellを開いて、以下のコマンドを実行する
    powershell
    Set-Service -Name sshd -StartupType 'Automatic' # OpenSSHサーバーを自動スタートアップに設定
    Start-Service sshd # OpenSSHサーバーを起動
    Get-Service -Name sshd # OpenSSHサーバーの状態を確認
    
    Statusが「Running」になっていれば起動成功

iOSのショートカットを設定

  1. ショートカットアプリを開き、新しいショートカットを作成する画面を開く
  2. 「アラートを表示」を選択し、アラートメッセージを入力する
  3. 「SSH経由でスクリプトを実行」を選択し、以下のスクリプトを入力する
    commandPrompt
    # /s: シャットダウン, /f: 警告せずにアプリケーションの実行を強制終了, /t 0:タイムアウト0s
    shutdown /s /f /t 0
    
    • ホスト:固定にしているローカルIPアドレス
    • ポート:22
    • ユーザ:Windowsログオンで使用しているユーザー名
    • 認証:パスワード
    • パスワード:Windowsログオンで使用しているパスワード
    • 入力:デフォルト
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?