この記事はアーカイブ済みで、これ以上更新されることはありません。

Apple Remote Desktop で kickstart コマンドラインユーティリティを使う

kickstart を使えば、リモートコンピュータを再起動せずに、Apple Remote Desktop のコマンドを実行できます。

kickstart を使って、Apple Remote Desktop の環境設定を行います。たとえば、Apple Remote Desktop コンポーネントをインストール、アンインストール、起動、設定、再起動できます。

macOS Mojave 10.14 以降で kickstart コマンドラインユーティリティを使って、画面共有でリモートの Mac をコントロールする方法については、こちらの記事を参照してください。

はじめに

kickstart は以下の場所で見つかります。

/システム/ライブラリ/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart

この記事で紹介するコマンドは 1 行で入力してください。入力時に行が折り返して表示されても問題ありません。コマンド全体を入力し終わるまでは、「return」キーを押さないでください。

kickstart コマンドについて詳しく調べるには、-help フラグを使います。

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -help

コマンド例

この記事のコマンドは、Apple Remote Desktop 3.2 以降でご利用になれます。

利用できるコマンドの例を以下に紹介します。

  • ARD Agent とヘルパーを再起動する:

    sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -restart -agent

  • Remote Desktop 共有を有効にし、ユーザ全員にアクセス権を認め、Menu extra を有効にする:

    sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -allowAccessFor -allUsers -privs -all -clientopts -setmenuextra -menuextra yes

  • Remote Desktop 共有を有効にし、特定のユーザにアクセス権を認める:

    sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -allowAccessFor -specifiedUsersYou must use the -configure, -access, and -privs options in a separate command to specify the set of users and their access privileges. For example, this command is for users with the short names "teacher" and “student." It gives them access to observe (but not control) the computer, and to send text messages:

    sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -users teacher,student -access -on -privs -ControlObserve -ObserveOnly -TextMessagesUnlike other kickstart options, you can’t combine the allowAccessFor options with other kickstart options. You must use it as in the last two samples above. You might have to call kickstart more than once to finish a computer’s setup.

  • 特定のユーザ (この例では「student」) のアクセス権を無効にする:

    sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -configure -users student -access -off

  • ARD Agent を無効にし、ユーザ全員のアクセス権を無効にする:

    sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -deactivate -configure -access -off

公開日: