> For the complete documentation index, see [llms.txt](https://docs.keeper.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.keeper.io/enterprise-guide/jp/keeper-msp/msp-developer-apis/commander-template.md).

# コマンダーテンプレート

マネージドサービスプロバイダ向けKeeperコマンダーCLI

このスクリプトを使用すると、Keeperコマンダーで標準的な管理対象企業の構成を作成できます。

6つのチーム、3つの共有フォルダ、およびそれらの権限を作成します。

| チーム            | アクセス権              |
| -------------- | ------------------ |
| IT Management  | すべてのフォルダを管理        |
| Server Admins  | Serversフォルダを管理     |
| Network Admins | Networkフォルダを管理     |
| Helpdesk       | Usersフォルダを管理       |
| SOC            | すべてのフォルダを管理        |
| NOC            | すべてのフォルダを読み取り専用で参照 |

このスクリプトは、`Users`、`Servers`、`Network`の各フォルダを作成します。各フォルダ名の先頭には、管理対象企業名が付加されます。

{% hint style="info" %}
スクリプトを実行する前に、[KeeperコマンダーCLI](https://docs.keeper.io/enterprise-guide/jp/commander-cli.md)をインストールしてください。
{% endhint %}

### スクリプトの実行

[永続ログインセッション](https://docs.keeper.io/keeperpam/jp/commander-cli/commander-installation-setup/logging-in.md#persistent-login-sessions-stay-logged-in)を使用してください。アカウントには、Keeperコンソールとボルトの両方へのアクセス権が必要です。

1. スクリプトを`NewClientFolders.bash`として保存します。
2. `<CompanyName>`を管理対象企業名に置き換えます。
3. `NewClientFolders.bash ABC | keeper --batch-mode -`を実行します。

```bash
#!/bin/bash
#
# 使用方法: NewClientFolders.bash <CompanyName> | keeper --batch-mode -
#
#########################################################################
if [ "${1}" == "" ] || [ $# -gt 1 ]; then
        echo "Please include new Company Name as parameter 1"
        echo "Usage: NewClientFolders.bash <CompanyName> | keeper --batch-mode -"
        exit 0
fi

### 新しいチームを作成
echo "enterprise-team --add  --approve \"IT Management\""
echo "enterprise-team --add  --approve \"${1}-Server Admins\""
echo "enterprise-team --add  --approve \"${1}-Network Admins\""
echo "enterprise-team --add  --approve \"${1}-Helpdesk\""
echo "enterprise-team --add  --approve \"${1}-SOC\""
echo "enterprise-team --add  --approve \"${1}-NOC\""

### 新しい共有フォルダを作成
echo "mkdir -uf \"${1}\""				      # 企業の整理用フォルダを作成
echo "mkdir -sf \"${1}\"/\"${1}-Users\""                      # デフォルトの権限で共有フォルダを作成
echo "mkdir -sf \"${1}\"/\"${1}-Servers\""                    
echo "mkdir -sf \"${1}\"/\"${1}-Network\""                   

### 共有フォルダへのチーム追加
### IT Managementチーム
echo "share-folder -a grant  -o on -e \"IT Management\" \"${1}\"/\"${1}-Users\""               # -o (ユーザーの管理)
echo "share-folder -a grant  -o on -e \"IT Management\" \"${1}\"/\"${1}-Servers\""        
echo "share-folder -a grant  -o on -e \"IT Management\" \"${1}\"/\"${1}-Network\""        

### Server Adminsチーム
echo "share-folder -a grant  -d on -p on -e \"${1}-Server Admins\" \"${1}\"/\"${1}-Servers\""  # -d (編集可能), -p (レコードの追加/削除可能)

### Network Adminsチーム
echo "share-folder -a grant  -d on -p on -e \"${1}-Network Admins\" \"${1}\"/\"${1}-Network\""  

### Helpdeskチーム
echo "share-folder -a grant  -d on -p on -e \"${1}-Helpdesk\" \"${1}\"/\"${1}-Users\""         

### SOCチーム
echo "share-folder -a grant  -d on -p on -e \"${1}-SOC\" \"${1}\"/\"${1}-Users\""     
echo "share-folder -a grant  -d on -p on -e \"${1}-SOC\" \"${1}\"/\"${1}-Servers\""   
echo "share-folder -a grant  -d on -p on -e \"${1}-SOC\" \"${1}\"/\"${1}-Network\""   

# NOCはすべての共有フォルダを読み取り専用で参照
echo "share-folder -e \"${1}-NOC\" \"${1}\"/\"${1}-Users\""                                     # 読み取り専用
echo "share-folder -e \"${1}-NOC\" \"${1}\"/\"${1}-Servers\""   
echo "share-folder -e \"${1}-NOC\" \"${1}\"/\"${1}-Network\""    
exit
```

その他のコマンドについては、[MSP管理コマンド](https://docs.keeper.io/keeperpam/jp/commander-cli/command-reference/msp-management-commands.md)をご参照ください。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.keeper.io/enterprise-guide/jp/keeper-msp/msp-developer-apis/commander-template.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
