# エンタープライズノードコマンド

#### 概要 <a href="#usage-3" id="usage-3"></a>

ノードは、ユーザー、ロール、チーム、およびプロビジョニング/認証方式を整理するための組織単位です。

**使い方**

```bash
enterprise-node command [--options] OR en command [--options]
```

**別名:** `en`

#### コマンド <a href="#commands-1" id="commands-1"></a>

エンタープライズノードコマンドで利用できるコマンドは次のとおりです。

<table><thead><tr><th width="229.7890625">コマンド</th><th>説明</th></tr></thead><tbody><tr><td><a href="#enterprise-node-view"><code>view</code></a></td><td>エンタープライズノードを表示します。</td></tr><tr><td><a href="#enterprise-info-tree"><code>add</code></a></td><td>エンタープライズノードを作成します。</td></tr><tr><td><a href="#enterprise-info-tree-1"><code>edit</code></a></td><td>エンタープライズノードを編集します。</td></tr><tr><td><a href="#enterprise-info-tree-2"><code>delete</code></a></td><td>エンタープライズノードを削除します。</td></tr><tr><td><a href="#enterprise-info-tree-3"><code>set-logo</code></a></td><td>ノードのロゴを設定します。</td></tr><tr><td><a href="#enterprise-node-invite-email"><code>invite-email</code></a></td><td>招待メールを設定します。</td></tr><tr><td><a href="#enterprise-node-invite-email-1"><code>wipe-out</code></a></td><td>ノードの内容をワイプアウトします。</td></tr></tbody></table>

### エンタープライズノード表示コマンド

エンタープライズノードを表示します。

<details>

<summary>DotNet CLI</summary>

**コマンド:** `enterprise-node <node name> --command=tree OR en tree -v`

**例:**

```sh
My Vault> enterprise-node DEVOPS --command=tree
```

</details>

<details>

<summary>DotNet SDK</summary>

**関数:** `EnterpriseData.Nodes`

```csharp
var nodes = enterpriseData.Nodes
                            .Where(x => string.Equals(x.DisplayName, arguments.Node, StringComparison.InvariantCultureIgnoreCase))
                            .ToArray();
```

</details>

<details>

<summary>PowerCommander</summary>

**コマンド:** `Get-KeeperEnterpriseNode`

**別名:** `ken`

**パラメータ:**

* `-Name` - ノード名 (完全一致)
* `-Filter` - 検索用フィルター文字列
* `-Format` - 出力形式
* `-Output` - 出力先ファイル名

**例:**

<pre class="language-powershell"><code class="lang-powershell"># すべてのノードを一覧
<strong>PS> Get-KeeperEnterpriseNode
</strong><strong>----------------------------------------
</strong># 特定のノードを取得
PS> Get-KeeperEnterpriseNode -Name Test1

# ノードを検索
PS> Get-KeeperEnterpriseNode -Filter Test
</code></pre>

</details>

<details>

<summary>Python CLI</summary>

**コマンド:** `enterprise-node view`

**パラメータ:**

`node` - ノード名またはUID (必須)

**フラグ:**

* `-v`, `--verbose` - 詳細情報を出力する
* `--format` - 出力形式: `json`
* `--output` - 出力ファイル名

</details>

<details>

<summary>Python SDK</summary>

**関数:**

```python
node = enterprise_data.nodes.get_entity(node_id) if isintance(node_id, int)
node = [node for node in enterprise_data.nodes.get_all_entities() if node.name.lower() == node_id]  if isintance(node_id, str)
```

</details>

### エンタープライズノード追加コマンド (add) <a href="#enterprise-info-tree" id="enterprise-info-tree"></a>

エンタープライズノードを作成します。

<details>

<summary>DotNet CLI</summary>

**コマンド:** `enterprise-node --command=add <name> --parent "<main node>"`

**別名:** `en --command=add <name>`

**オプション:**

* `--parent <node>` - 親ノード名またはID
* `--name <name>` - 新しいノード表示名 (追加/更新時)
* `-v, --verbose` - ノードIDなどの追加情報を表示
* `--toggle-isolated` - ノード分離の切り替え (可視性を制限)

**例:**

```shellscript
My Vault> enterprise-node --command=add "Engineering"
OR
My Vault> en --command=add "Isolated Team" --toggle-isolated
```

</details>

<details>

<summary>DotNet SDK</summary>

**関数:** `CreateNode`

```csharp
public static async Task<EnterpriseNode> CreateNode(this EnterpriseData enterpriseData, string nodeName, EnterpriseNode parentNode = null)
```

**例:**

```csharp
var node = await enterpriseData.CreateNode(arguments.Node, parentNode);
```

</details>

<details>

<summary>PowerCommander</summary>

**コマンド:** `New-KeeperEnterpriseNode`

**別名:** `kena`

**構文:**

```powershell
New-KeeperEnterpriseNode [-NodeName] <string> [[-ParentNode] <string>] [<CommonParameters>]
```

**パラメータ:**

* `-NodeName` - ノード名
* `-ParentNode` - 親ノード名またはID

**例:**

```powershell
PS> New-KeeperEnterpriseNode -ParentNode "parent" -NodeName "MyNode"
OR 
kena "DevOps" -ParentNode 12345
```

</details>

<details>

<summary>Python CLI</summary>

**コマンド:** `enterprise-node add`

**パラメータ:**

`node` - ノード名。繰り返し指定可 (必須)

**フラグ:**

* `--parent` - 親ノード名またはID
* `--name`, `--displayname` - ノード表示名を設定
* `--set-isolated` - ノード分離を設定: `on` または `off`
* `-f`, `--force` - 確認プロンプトを表示しない

</details>

<details>

<summary>Python SDK</summary>

**関数:**

```python
from keepersdk.enterprise import batch_management,  enterprise_management

node_names = list['names of nodes to be created']
nodes_to_add = [enterprise_management.NodeEdit(
    node_id=enterprise_loader.get_enterprise_id(), name=node_name, parent_id=parent_node_id,
    restrict_visibility=is_isolated)
    for node_name in node_names]
batch = batch_management.BatchManagement(loader=enterprise_loader, logger=enterprise_manager_logger)
batch.modify_nodes(to_add=nodes_to_add)
batch.apply()
```

</details>

### エンタープライズノード編集コマンド (edit) <a href="#enterprise-info-tree" id="enterprise-info-tree"></a>

エンタープライズノードを編集します。

<details>

<summary>DotNet CLI</summary>

**コマンド:** `enterprise-node --command=update [--options]`

**別名:** `en --command=update [--options]`

**オプション:**

* `--parent <node>` - 親ノード名またはID
* `--name <name>` - 新しいノード表示名 (追加/更新時)
* `-v, --verbose` - ノードIDなどの追加情報を表示
* `--toggle-isolated` - ノード分離の切り替え (可視性を制限)

**例:**

```sh
# Update node
enterprise-node --command=update "Engineering" --name "Engineering Dept"
enterprise-node update 12345 --parent "IT"
en update "Sales" --toggle-isolated  
```

</details>

<details>

<summary>DotNet SDK</summary>

**関数**: `UpdateNode`

```csharp
public static async Task UpdateNode(this EnterpriseData enterpriseData, EnterpriseNode node, EnterpriseNode newParentNode = null)
```

**例:**

```csharp
await enterpriseData.UpdateNode(node, parentNode);
```

</details>

<details>

<summary>PowerCommander</summary>

**コマンド:** `Edit-KeeperEnterpriseNode`

**別名:** `kenu`

**使い方:**

```powershell
Edit-KeeperEnterpriseNode [-Node] <string> 
                          [-NewNodeName <string>] 
                          [-ParentNode <string>] 
                          [-RestrictVisibility] 
                          [<CommonParameters>]
```

**パラメータ:**

| パラメータ   | 説明                                   |
| ------- | ------------------------------------ |
| `-Node` | 更新するノード名またはIDです。位置指定パラメータ (位置 0) です。 |

**オプション:**

| オプション                 | 説明                                          |
| --------------------- | ------------------------------------------- |
| `-NewNodeName`        | ノードの新しい名前です。既存ノードの名前変更に使用します。               |
| `-ParentNode`         | 新しい親ノード名またはIDです。階層内の別の場所へノードを移動するために使用します。  |
| `-RestrictVisibility` | ノードの分離を有効にします。有効にすると、ノード外のユーザーからの可視性を制限します。 |

**例:**

```powershell
PS> Get-KeeperEnterpriseNode                                                                         

Id              DisplayName        ParentNodeName  RestrictVisibility Provisioning
--              -----------        --------------  ------------------ ------------
894448414228482 MS.                                False              
894448414228541 Test node                          False              

PS> Edit-KeeperEnterpriseNode -Node "Test node" -NodeName "test_node_updated2" -ParentNode "MS" -RestrictVisibility        
Node "test_node_updated2" updated.
Node Isolation: ON
PS> Get-KeeperEnterpriseNode                                                                                       
        
Id              DisplayName        ParentNodeName  RestrictVisibility Provisioning
--              -----------        --------------  ------------------ ------------
894448414228482 MS                                 False              
894448414228541 test_node_updated2 MS              True               

```

</details>

<details>

<summary>Python CLI</summary>

**コマンド:** `enterprise-node edit`

**パラメータ:**

`node` - ノード名またはID。繰り返し指定可 (必須)

**フラグ:**

* `--parent` - 親ノード名またはID
* `--name`, `--displayname` - ノード表示名を設定
* `--set-isolated` - ノード分離を設定: `on` または `off`

</details>

<details>

<summary>Python SDK</summary>

**関数:**

```python
from keepersdk.enterprise import batch_management,  enterprise_management

node = enterprise_data.nodes.get_entity(node_id)
node_list = [node]
nodes_to_update = [enterprise_management.NodeEdit(
    node_id=node.node_id, name=display_name, parent_id=node.parent_id, restrict_visibility=is_isolated)
    for node in node_list]
batch = batch_management.BatchManagement(loader=enterprise_loader, logger=enterprise_manager_logger)
batch.modify_nodes(to_update=nodes_to_update)
batch.apply()
```

</details>

### エンタープライズノード削除コマンド (delete) <a href="#enterprise-info-tree" id="enterprise-info-tree"></a>

エンタープライズノードを削除します。

<details>

<summary>DotNet CLI</summary>

**コマンド:** `enterprise-node --command=delete <node name>`

**別名:** `en --command=delete <node name>`

**オプション:**

* `-f, --force` - エンタープライズデータを強制再読み込み

**例:**

<pre><code># Delete node
<strong>My Vault> en --command=delete "Old Department" 
</strong>OR
enterprise-node --command=delete "Old Department"
enterprise-node --command=delete 12345
</code></pre>

</details>

<details>

<summary>DotNet SDK</summary>

**関数:** `DeleteNode`

<pre><code><strong>await enterpriseData.DeleteNode(node.Id);
</strong>public static async Task DeleteNode(this EnterpriseData enterpriseData, long nodeId)
</code></pre>

</details>

<details>

<summary>PowerCommander</summary>

**コマンド:** `Remove-KeeperEnterpriseNode`

**別名:** `kend`

**パラメータ:**

<table><thead><tr><th width="159.015625">パラメータ</th><th>説明</th></tr></thead><tbody><tr><td><code>Node</code></td><td>削除対象のノード名またはIDです。表示名または数値のノードIDを指定します。</td></tr><tr><td><code>Force</code></td><td>確認プロンプトをスキップします。指定した場合、確認なしでノードを削除します。</td></tr></tbody></table>

**使い方:**

```powershell
PS > Remove-KeeperEnterpriseNode -Node "Old Department"
PS > kend "Old Department"
```

**例:**

```powershell
PS> Remove-KeeperEnterpriseNode -Node "test_node_1"                 

Confirm
Are you sure you want to perform this action?
Performing the operation "Delete Enterprise Node" on target "test_node_1".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): a
Node "test_node_1" deleted successfully.
```

</details>

<details>

<summary>Python CLI</summary>

**コマンド:** `enterprise-node delete`

**パラメータ:**

`node` - ノード名またはID (必須)

**フラグ:**

* `--logo-file` - ローカル画像ファイルで会社ロゴを設定 (最大サイズ: 500 kB、最小寸法: 10x10、最大寸法: 320x320)

</details>

<details>

<summary>Python SDK</summary>

**関数:**

```python
from keepersdk.enterprise import batch_management,  enterprise_management

node = enterprise_data.nodes.get_entity(node_id)
node_list = [node]
batch = batch_management.BatchManagement(loader=enterprise_loader, logger=enterprise_manager_logger)
batch.modify_nodes(to_remove=(enterprise_management.NodeEdit(node_id=node.node_id) for node in node_list))
batch.apply()
```

</details>

### エンタープライズノードロゴ設定コマンド (set-logo) <a href="#enterprise-info-tree" id="enterprise-info-tree"></a>

エンタープライズノードのロゴを設定します。

<details>

<summary>DotNet CLI</summary>

**コマンド:** `enterprise-node --command=<action> <node_name> --logo-type=<logo_type> --logo-path=<upload_logo_path> OR en --command=<action> <node_name> --logo-type=<logo_type> --logo-path=<upload_logo_path>`

**パラメータ:**

<table><thead><tr><th width="227.4921875"></th><th>説明</th></tr></thead><tbody><tr><td><code>nodeId</code></td><td>ノードを表す EnterpriseNode IDです。</td></tr><tr><td><code>logo-type</code></td><td>ロゴの種類です (例: vault または email)。</td></tr><tr><td><code>logo-path</code></td><td>アップロードするファイルのパスです。</td></tr></tbody></table>

**例:**

```sh
My Vault> en --command="upload-custom-logo" "Test" --logo-type="vault" --logo-path="<logo_path>" 
```

**参考:**

[コマンダーリファレンス](/keeperpam/jp/commander-cli/command-reference/enterprise-management-commands.md#changing-role-enforcements-and-privileges)

</details>

<details>

<summary>DotNet SDK</summary>

**ノードへのカスタム招待の設定:**

**関数:** `UploadEnterpriseCustomLogo`

**使い方:**

{% code overflow="wrap" %}

```csharp
public static async Task<CheckEnterpriseCustomLogoUploadResponse> UploadEnterpriseCustomLogo(this EnterpriseData enterpriseData, long nodeId, string logoType, string filePath)
```

{% endcode %}

**パラメータ:**

<table><thead><tr><th width="227.4921875"></th><th>説明</th></tr></thead><tbody><tr><td><code>nodeId</code></td><td>ノードを表す EnterpriseNode IDです。</td></tr><tr><td><code>logoType</code></td><td>ロゴの種類です (例: vault または email)。</td></tr><tr><td><code>filePath</code></td><td>アップロードするファイルのパスです。</td></tr></tbody></table>

**例:**

{% code overflow="wrap" %}

```csharp
await EnterpriseManagementExamples.EnterpriseNodeExamples.SetEnterpriseCustomLogoExample.SetEnterpriseCustomLogoExample(70411693850884, "vault", "<file_path>");
```

{% endcode %}

**参考:**

[コマンダーリファレンス](/keeperpam/jp/commander-cli/command-reference/enterprise-management-commands.md#changing-role-enforcements-and-privileges)

</details>

<details>

<summary>PowerCommander</summary>

**コマンド:** `Set-KeeperEnterpriseNodeCustomLogo`

**フラグ**:

<table><thead><tr><th width="198.5810546875">フラグ</th><th>説明</th></tr></thead><tbody><tr><td><code>Node</code></td><td>ノード名またはIDです。</td></tr><tr><td><code>LogoType</code></td><td>ロゴの種類です (例: vault、email)。</td></tr><tr><td><code>LogoPath</code></td><td>ロゴファイルのパスです。</td></tr></tbody></table>

**例:**

```
PS > Set-KeeperEnterpriseNodeCustomLogo -Node PCTNode -LogoType vault -LogoPath /Users/satish/Desktop/dotnet-reference/keeper-sdk-dotnet/download1.jpg
Custom logo uploaded for node "PCTNode"

LogoPath   : /vault/logo/nycE_9wCsOg
Status     : active
IsSuccess  : True
result     : success
resultCode : 
message    : 
command    : check_vault_logo_upload
```

</details>

<details>

<summary>Python CLI</summary>

**コマンド:** `enterprise-node set-logo`

**パラメータ:**

* `node` : ノード名またはID
* `--logo-file` : ローカル画像ファイルで会社ロゴを設定 (最大サイズ: 500 kB、最小寸法: 10x10、最大寸法: 320x320)

**例:**

```sh
My Vault> enterprise-node set-logo <node_uid> --logo-file="logo.jpg"
```

</details>

<details>

<summary>Python SDK</summary>

**関数:**

```python
from keepersdk.vault import attachment

upload_task = attachment.FileUploadTask(logo_filepath)
upload_task.prepare()
# Check file MIME-type and size
if upload_task.mime_type not in {'image/jpeg', 'image/png', 'image/gif'}:
    raise Exception('File must be a JPEG, PNG, or GIF image')
if upload_task.size > 500000:
    raise Exception('Filesize must be less than 500 kB')
rq_logo = {
    'command': f'request_{logo_type}_logo_upload',
    'node_id': node_id,
}
rs_logo = KeeperAuth_obj.execute_auth_command(rq_logo)
# Construct POST request for upload
upload_id = rs_logo.get('upload_id')
upload_url = rs_logo.get('url')
assert isinstance(upload_url, str)
success_status_code = rs_logo.get('success_status_code')
file_param: Optional[str] = rs_logo.get('file_parameter')
assert file_param is not None
form_data = rs_logo.get('parameters')
assert isinstance(form_data, dict)
form_data['Content-Type'] = upload_task.mime_type
with upload_task.open() as task_stream:
    files = {file_param: (None, task_stream, upload_task.mime_type)}
    upload_rs = requests.post(upload_url, files=files, data=form_data)
    if upload_rs.status_code == success_status_code:
        # Verify file upload
        check_rq = {
            'command': f'check_{logo_type}_logo_upload',
            'node_id': node_id,
            'upload_id': upload_id
        }
        while True:
            check_rs = KeeperAuth_obj.execute_auth_command(check_rq)
            check_status = check_rs.get('status')
            if check_status == 'pending':
                time.sleep(2)
            else:
                if check_status != 'active':
                    if check_status == 'invalid_dimensions':
                        raise Exception('Image dimensions must be between 10x10 and 320x320')
                    else:
                        raise Exception(f'Upload status = {check_status}')
                else:
                    get_logger().info('File "%s" set as %s logo.', logo_fp, logo_type)
                    break
    else:
        raise Exception(f'HTTP status code: {upload_rs.status_code}, expected {success_status_code}')
```

</details>

### エンタープライズノードカスタム招待メール設定コマンド (invite-email) <a href="#enterprise-node-invite-email" id="enterprise-node-invite-email"></a>

招待メールを設定します。

<details>

<summary>DotNet CLI</summary>

**コマンド:** `enterprise-node --command=<action> <node_name> --json-file-path="<file_path>" OR en --command=<action> <node_name> --json-file-path="<file_path>"`

**パラメータ:**

<table><thead><tr><th width="227.4921875"></th><th>説明</th></tr></thead><tbody><tr><td><code>nodeId</code></td><td>ノードを表す EnterpriseNode IDです。</td></tr><tr><td><code>jsonFilePath</code></td><td><code>subject</code>、<code>header</code>、<code>body</code>、<code>buttonLabel</code> を含むJSONファイルを作成し、そのパスを指定します。</td></tr></tbody></table>

**例:**

```sh
My Vault> enterprise-node --command="set-custom-invitation" "Test" --json-file-path="<file_path>"
```

**参考:**

[コマンダーリファレンス](/keeperpam/jp/commander-cli/command-reference/enterprise-management-commands.md#changing-role-enforcements-and-privileges)

</details>

<details>

<summary>DotNet SDK</summary>

**ノードへのカスタム招待の設定:**

**関数:** `SetEnterpriseCustomInvitation`

**使い方:**

{% code overflow="wrap" %}

```csharp
public static async Task SetEnterpriseCustomInvitation(this EnterpriseData enterpriseData, long nodeId, string jsonFilePath)
```

{% endcode %}

**パラメータ:**

<table><thead><tr><th width="227.4921875"></th><th>説明</th></tr></thead><tbody><tr><td><code>nodeId</code></td><td>ノードを表す EnterpriseNode IDです。</td></tr><tr><td><code>jsonFilePath</code></td><td><code>subject</code>、<code>header</code>、<code>body</code>、<code>buttonLabel</code> を含むJSONファイルを作成し、そのパスを指定します。</td></tr></tbody></table>

**例:**

{% code overflow="wrap" %}

```csharp
await EnterpriseManagementExamples.EnterpriseNodeExamples.SetEnterpriseCustomInvitationExample.SetEnterpriseCustomInvitationExample(70411693850884, "<Path_to_jsonFile>");
```

{% endcode %}

**参考:**

[コマンダーリファレンス](/keeperpam/jp/commander-cli/command-reference/enterprise-management-commands.md#changing-role-enforcements-and-privileges)

</details>

<details>

<summary>PowerCommander</summary>

**コマンド:** `Set-KeeperEnterpriseNodeCustomInvitation`

**フラグ:**

<table><thead><tr><th width="227.8876953125"></th><th></th></tr></thead><tbody><tr><td><code>Node</code></td><td>ノード名またはIDです。</td></tr><tr><td><code>JsonFilePath</code></td><td>招待テンプレート (subject、header、body、buttonLabel) を含むJSONファイルのパスです。</td></tr></tbody></table>

**例:**

```
PS> Set-KeeperEnterpriseNodeCustomInvitation -Node PCTNode -JsonFilePath "/Users/xxaaeafd/Desktop/dotnet-reference/keeper-sdk-dotnet/testfile.json"
Custom invitation set for node "PCTNode"
```

</details>

<details>

<summary>Python CLI</summary>

**コマンド:** `enterprise-node invite-email`

**パラメータ:**

`node` - ノード名またはID (必須)

**フラグ:**

* `-f`, `--force` - 確認プロンプトを表示しない
* `--invite-email` - ファイルから招待メールテンプレートを設定する。ファイルが存在しない場合は現在のテンプレートを保存する。標準出力にはダッシュ (-) を指定する

</details>

<details>

<summary>Python SDK</summary>

**関数:** 非対応

</details>

### エンタープライズノードワイプアウトコマンド (wipe-out) <a href="#enterprise-node-invite-email" id="enterprise-node-invite-email"></a>

**ワイプアウト** は、指定したエンタープライズノード配下のコンテンツをすべて削除します。

<table><thead><tr><th width="237.9990234375">削除対象</th><th>説明</th></tr></thead><tbody><tr><td><strong>ロール–ユーザーリンク</strong></td><td>当該ノードまたはその子孫に属するすべてのロールから、すべてのユーザーが外されます。</td></tr><tr><td><strong>ロール–管理ノードリンク</strong></td><td>それらのロールに紐づく管理ノードの関連がすべて削除されます。</td></tr><tr><td><strong>ロール</strong></td><td>親ノードが対象ノードまたはその子孫であるロールがすべて削除されます。</td></tr><tr><td><strong>ユーザー</strong></td><td>親ノードが対象ノードまたはその子孫であるユーザーがすべて削除されます。</td></tr><tr><td><strong>チーム</strong></td><td>ノード配下のすべてのチーム (および .NET CLI ではキュー済みチーム) が削除されます。</td></tr><tr><td><strong>子ノード</strong></td><td>対象ノード直下のすべての子ノードが削除されます。</td></tr></tbody></table>

**対象ノード自体は削除されず**、空の状態で残ります。**ルートノードはワイプアウトできません**。

<details>

<summary>DotNet CLI</summary>

**コマンド:** `enterprise-node --command=wipe-out <node>`

<table><thead><tr><th width="227.8046875">引数</th><th>説明</th></tr></thead><tbody><tr><td><code>--command=wipe-out</code></td><td>ワイプアウト操作を選択するサブコマンドです。</td></tr><tr><td><code>&#x3C;node></code></td><td>ワイプアウトするノード名またはノードIDです。<code>wipe-out</code> では必須です。</td></tr></tbody></table>

**例:**

```shellscript
enterprise-node --command=wipe-out "Sales"
# or using alias
en --command=wipe-out "Sales"
```

</details>

<details>

<summary>DotNet SDK</summary>

近日公開

</details>

<details>

<summary>PowerCommander</summary>

**コマンド:** `Invoke-KeeperEnterpriseNodeWipeOut`

**別名:** `kenwipe`

**パラメータ:**

<table><thead><tr><th width="117.08203125">パラメータ</th><th width="135.357421875">必須</th><th>説明</th></tr></thead><tbody><tr><td><code>Node</code></td><td>はい</td><td>ワイプアウトするノード名またはノードIDです。</td></tr><tr><td><code>Force</code></td><td>いいえ</td><td>確認プロンプトをスキップします。注意して使用してください。</td></tr></tbody></table>

**例:**

```powershell
PowerCommander> Invoke-KeeperEnterpriseNodeWipeOut -Node Test1

Confirm
Are you sure you want to perform this action?
Performing the operation "Wipe out" on target "Node "Test1" and all its content".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "Y"): a
WARNING: This action cannot be undone.
Node "Test1" and its content have been wiped out.
```

</details>

<details>

<summary>Python CLI</summary>

**コマンド:** `enterprise-node wipe-out`

**パラメータ:**

* `node` - ノード名またはID (必須)

**警告:** この操作は取り消せず、すべてのユーザー、ロール、チーム、子ノードを削除します。

</details>

<details>

<summary>Python SDK</summary>

**関数:**

```python
from keepersdk.enterprise import batch_management,  enterprise_management

node = enterprise_data.nodes.get_entity(node_id)
if node.node_id == enterprise_data.root_node.node_id:
    raise ValueError('Cannot wipe out root node')

subnode_lookup: Dict[int, List[int]] = {}
for n in enterprise_data.nodes.get_all_entities():
    parent_id = n.parent_id or 0
    if parent_id not in subnode_lookup:
        subnode_lookup[parent_id] = []
    subnode_lookup[parent_id].append(n.node_id)

sub_nodes = [node.node_id]
pos = 0
while pos < len(sub_nodes):
    if sub_nodes[pos] in subnode_lookup:
        sub_nodes.extend(subnode_lookup[sub_nodes[pos]])
    pos += 1
nodes = set(sub_nodes)

batch = batch_management.BatchManagement(loader=enterprise_loader, logger=enterprise_manager_logger)

roles = {x.role_id for x in enterprise_data.roles.get_all_entities() if x.node_id in nodes}
users = {x.enterprise_user_id for x in enterprise_data.users.get_all_entities() if x.node_id in nodes}

role_users = [enterprise_management.RoleUserEdit(role_id=x.role_id, enterprise_user_id=x.enterprise_user_id)
                for x in enterprise_data.role_users.get_all_links() if
                x.role_id in roles or x.enterprise_user_id in users]
if len(role_users) > 0:
    batch.modify_role_users(to_remove=role_users)

managed_nodes = [enterprise_management.ManagedNodeEdit(role_id=x.role_id, managed_node_id=x.managed_node_id)
                    for x in enterprise_data.managed_nodes.get_all_links() if
                    x.managed_node_id in nodes or x.role_id in roles]
if len(managed_nodes) > 0:
    batch.modify_managed_nodes(to_remove=managed_nodes)

roles_to_remove = [enterprise_management.RoleEdit(role_id=x) for x in roles]
if len(roles) > 0:
    batch.modify_roles(to_remove=roles_to_remove)

users_to_remove = [enterprise_management.UserEdit(enterprise_user_id=x) for x in users]
if len(users_to_remove) > 0:
    batch.modify_users(to_remove=users_to_remove)

queued_teams = [enterprise_management.TeamEdit(team_uid=x.team_uid)
                for x in enterprise_data.queued_teams.get_all_entities() if x.node_id in nodes]
if len(queued_teams) > 0:
    batch.modify_teams(to_remove=queued_teams)

teams = [enterprise_management.TeamEdit(team_uid=x.team_uid)
            for x in enterprise_data.teams.get_all_entities() if x.node_id in nodes]
if len(teams) > 0:
    batch.modify_teams(to_remove=teams)

sub_nodes.pop(0)
sub_nodes.reverse()
nodes_to_remove = [enterprise_management.NodeEdit(node_id=x) for x in sub_nodes]
if len(nodes_to_remove) > 0:
    batch.modify_nodes(to_remove=nodes_to_remove)

batch.apply()
```

</details>

### エンタープライズノードカスタム招待メールデータ取得コマンド (get-custom-invitation)

ノードのカスタム招待テンプレートを取得するコマンド/関数です。

<details>

<summary>DotNet CLI</summary>

**コマンド:** `enterprise-node --command=<action> <node_name> OR en --command=<action> <node_name>`

**パラメータ:**

<table><thead><tr><th width="227.4921875"></th><th>説明</th></tr></thead><tbody><tr><td><code>nodeId</code></td><td>ノードを表す EnterpriseNode IDです。</td></tr></tbody></table>

**例:**

```sh
My Vault> enterprise-node --command="get-custom-invitation" "Test"   
```

**参考:**

[コマンダーリファレンス](/keeperpam/jp/commander-cli/command-reference/enterprise-management-commands.md#changing-role-enforcements-and-privileges)

</details>

<details>

<summary>DotNet SDK</summary>

**カスタム招待テンプレートの取得:**

**関数:** `GetEnterpriseCustomInvitation`

**使い方:**

{% code overflow="wrap" %}

```csharp
public static async Task<GetEnterpriseCustomInvitationResponse> GetEnterpriseCustomInvitation(this EnterpriseData enterpriseData, long nodeId)
```

{% endcode %}

**パラメータ:**

<table><thead><tr><th width="227.4921875"></th><th>説明</th></tr></thead><tbody><tr><td><code>nodeId</code></td><td>ノードを表す EnterpriseNode IDです。</td></tr></tbody></table>

**例:**

{% code overflow="wrap" %}

```csharp
await EnterpriseManagementExamples.EnterpriseNodeExamples.GetEnterpriseCustomInvitationExample.GetEnterpriseCustomInvitationExample(70411693850884);
```

{% endcode %}

**参考:**

[コマンダーリファレンス](/keeperpam/jp/commander-cli/command-reference/enterprise-management-commands.md#changing-role-enforcements-and-privileges)

</details>

<details>

<summary>PowerCommander</summary>

**コマンド:** `Get-KeeperEnterpriseNodeCustomInvitation`

**フラグ:**

<table><thead><tr><th width="227.8876953125"></th><th></th></tr></thead><tbody><tr><td><code>Node</code></td><td>ノード名またはIDです。</td></tr><tr><td><code>JsonFilePath</code></td><td>招待テンプレート (subject、header、body、buttonLabel) を含むJSONファイルのパスです。</td></tr></tbody></table>

**例:**

```
PS> Get-KeeperEnterpriseNodeCustomInvitation -Node PCTNode                                                                                       
Custom invitation for node "PCTNode":
Subject: You're Invited to Join
Header: Welcome to Our Portal
Body: Click the button below to create your Keeper account and start protecting your passwords.
Button Label: Create Account

Subject     : You're Invited to Join
Header      : Welcome to Our Portal
Body        : Click the button below to create your Keeper account and start protecting your passwords.
ButtonLabel : Create Account
LogoPath    : 
IsSuccess   : True
result      : success
resultCode  : 
message     : 
command     : get_enterprise_custom_invitation
```

**参考:**

[コマンダーリファレンス](/keeperpam/jp/commander-cli/command-reference/enterprise-management-commands.md#changing-role-enforcements-and-privileges)

</details>

<details>

<summary>Python CLI</summary>

近日公開

**参考:**

[コマンダーリファレンス](/keeperpam/jp/commander-cli/command-reference/enterprise-management-commands.md#changing-role-enforcements-and-privileges)

</details>

<details>

<summary>Python SDK</summary>

近日公開

**参考:**

[コマンダーリファレンス](/keeperpam/jp/commander-cli/command-reference/enterprise-management-commands.md#changing-role-enforcements-and-privileges)

</details>


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.keeper.io/keeperpam/jp/commander-sdk/keeper-commander-sdks/sdk-command-reference/enterprise-management-commands/enterprise-node-commands.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
