# PowerShellモジュール

## 概要 <a href="#overview" id="overview"></a>

Keeperコマンダーのバージョンの1つは、.Netで開発されており、PowerShellモジュールが含まれています。このバージョンはPowerShell Galleryに `PowerCommander` モジュールとして公開されています。本ページでは、このPowerShellモジュールのインストールと使用方法について取り扱います。

## PowerShell CLI

KeeperのPowerShellコマンドラインツール (PowerCommander) では、基本的なボルトアクセス機能と管理機能がご利用になれます。

KeeperコマンダーのPowerShellモジュールは、PowerShell Galleryにて入手できます。

{% embed url="<https://www.powershellgallery.com/packages/PowerCommander/>" %}

## PowerShell Galleryからのインストール

PowerShell GalleryからPowerCommanderをインストールするには以下を実行します。

```powershell
Install-Module -Name PowerCommander
```

## GitHubリポジトリ

PowerCommanderモジュールをソースから実行する方法については、以下のGitHubページをご参照ください。

{% embed url="<https://github.com/Keeper-Security/keeper-sdk-dotnet/tree/master/PowerCommander>" %}

## インストールのトラブルシューティング <a href="#installation-troubleshooting" id="installation-troubleshooting"></a>

### 実行ポリシー権限を設定

PowerCommanderコマンドを実行できない場合は、実行ポリシーを設定する必要があると考えられます。以下のコマンドを実行して確認します。

```powershell
PS> Get-ExecutionPolicy -List
```

すると、以下のようなリストが表示されます。

```powershell
        Scope ExecutionPolicy
        ----- ---------------
MachinePolicy       Undefined
   UserPolicy       Undefined
      Process       Undefined
  CurrentUser       Undefined
 LocalMachine       Undefined
```

インストールの「Scope」が`Undefined`か`Restricted`の場合は、以下のコマンドを使用して`Unrestricted`に設定します。

```powershell
PS> Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser
```

{% hint style="info" %}
上の例では、`CurrentUser`のスコープを設定しています。
{% endhint %}

### 生体認証によるログイン

デバイスで生体認証が構成されている場合、Windows Helloを使用してKeeperコマンダーにログインできます。これにより、マスターパスワードおよび二要素認証 (2FA) を省略し、より高速で安全なログインが可能になります。

{% tabs %}
{% tab title="Windows" %}
Windowsユーザーの場合、Windows Helloが設定されていることを確認してください。

1. **\[設定]** > **\[アカウント]** > **\[サインインオプション]** > **\[Windows Hello]** に移動します。
2. 顔認識、指紋認証、またはPINのいずれかを設定します。
   {% endtab %}
   {% endtabs %}

### 生体認証の登録

まず、マスターパスワード (またはシングルサインオン) を使用してKeeperコマンダーにログインします。\
その後、生体認証を登録します。

```powershell
PS>Register-KeeperBiometricCredential -PassThru
Biometric Credential Creation for Keeper
Please complete Windows Hello verification to create the credential...
Credential ID stored for user: <user>
Credential created successfully
Success! Biometric authentication "<user>" has been registered.
Please register your device using the "Set-KeeperDeviceSettings -Register" command to set biometric authentication as your default login method.

Name                           Value
----                           -----
Username                       <user>
Timestamp                      26-09-2025 08:01:08
DisplayName                    <user>
CredentialId                   ...W25xo-z_9QyWdti5CsQ
Success                        True
```

指紋認証またはFace IDによる生体認証プロンプトが表示されます。

{% tabs %}
{% tab title="Windows" %}
システムから求められた際に、指紋またはFace IDで認証して登録を完了します。

<figure><img src="https://859776093-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPL6k1aGsLiFiiJ3Y7zCl%2Fuploads%2FvIbjNm0NH7UtIkwC1h3X%2Fimage.png?alt=media&#x26;token=19784360-8f34-49c5-ae42-23696f88fb92" alt="" width="375"><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

指紋またはFace IDによる認証が成功すると、登録が完了します。

```
Attempting keeper biometric authentication...
Verification completed successfully!
```

### デバイスの登録

生体認証をデフォルトのログイン方法として使用するには、デバイスを登録する必要があります。

```powershell
PS > Set-KeeperDeviceSettings -Register
```

## PowerCommanderのコマンド <a href="#powercommander-commands" id="powercommander-commands"></a>

### ログインコマンド

| コマンドレット名          | エイリアス | 説明              |
| ----------------- | ----- | --------------- |
| Connect-Keeper    | kc    | Keeperにログインする   |
| Disconnect-Keeper | kq    | ログアウトしてデータを消去する |

### 生体認証ログインコマンド

| コマンドレット名                                                                                                                                                          | エイリアス | 説明                                          |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- | ------------------------------------------- |
| [Register-KeeperBiometricCredential](https://docs.keeper.io/jp/keeperpam/commander-cli/commander-installation-setup/biometric-login#komando-1)                    |       | 新しい生体認証情報 (Windows Hello / WebAuthn) を登録します |
| [Assert-KeeperBiometricCredential](https://docs.keeper.io/jp/keeperpam/commander-cli/commander-installation-setup/biometric-login#komando-3)                      |       | 現在のユーザーに生体認証情報が登録されているか確認します                |
| [Show-KeeperBiometricCredentials](https://docs.keeper.io/jp/keeperpam/commander-cli/commander-installation-setup/biometric-login#komando-2)                       |       | 現在のユーザーに登録されているすべての生体認証情報を一覧表示します           |
| [Unregister-KeeperBiometricCredential](https://docs.keeper.io/jp/keeperpam/commander-cli/commander-installation-setup/installation-on-powershell/biometric-login) |       | 現在のユーザーから生体認証情報を削除します                       |

### レコードコマンド

<table><thead><tr><th width="307.66666666666663">コマンドレット名</th><th width="110">エイリアス</th><th>説明</th></tr></thead><tbody><tr><td>Connect-Keeper</td><td>kc</td><td>Keeperサーバーにログインします</td></tr><tr><td>Sync-Keeper</td><td>ks</td><td>Keeperサーバーと同期します</td></tr><tr><td>Disconnect-Keeper</td><td>kq</td><td>ログアウトしてデータを消去します</td></tr><tr><td>Get-KeeperLocation</td><td>kpwd</td><td>現在のKeeperフォルダを表示します</td></tr><tr><td>Set-KeeperLocation</td><td>kcd</td><td>Keeperフォルダを変更します</td></tr><tr><td>Get-KeeperChildItems</td><td>kdir</td><td>現在のKeeperフォルダのサブフォルダ名とレコード名を表示します</td></tr><tr><td>Get-KeeperObject</td><td>ko</td><td>UIDによってKeeperオブジェクトを取得します</td></tr><tr><td>Get-KeeperRecord</td><td>kr</td><td>すべてのレコードを列挙します</td></tr><tr><td>Add-KeeperRecord</td><td>kadd</td><td>Keeperのレコードを追加/変更します</td></tr><tr><td>Remove-KeeperRecord</td><td>kdel</td><td>Keeperのレコードを削除します</td></tr><tr><td>Get-KeeperSharedFolder</td><td>ksf</td><td>すべての共有フォルダを列挙します</td></tr><tr><td>Move-RecordToFolder</td><td>kmv</td><td>レコードをKeeperフォルダに移動します</td></tr><tr><td>Add-KeeperFolder</td><td>kmkdir</td><td>Keeperフォルダを作成します</td></tr><tr><td>Edit-KeeperFolder</td><td></td><td></td></tr><tr><td>Remove-KeeperFolder</td><td>krmdir</td><td>Keeperフォルダを削除します</td></tr><tr><td>Get-KeeperRecortType</td><td>krti</td><td>レコードタイプの情報を取得します</td></tr><tr><td>Copy-KeeperToClipboard</td><td>kcc</td><td>レコードのパスワードをクリップボードにコピーします</td></tr><tr><td>Show-TwoFactorCode</td><td>2fa</td><td>二要素コードを表示します</td></tr><tr><td>Copy-KeeperFileAttachment</td><td>kda</td><td>添付ファイルをダウンロードします</td></tr><tr><td>Copy-KeeperFileAttachmentToStream</td><td></td><td>添付ファイルをストリームにダウンロードします</td></tr><tr><td>Copy-FileToKeeperRecord</td><td></td><td>添付ファイルをレコードにアップロードします</td></tr><tr><td>Get-KeeperInformation</td><td>kwhoami</td><td>アカウントライセンス情報を表示します</td></tr><tr><td>Get-KeeperDeviceSettings</td><td></td><td>現在のデバイス設定を表示します</td></tr><tr><td>Set-KeeperDeviceSettings</td><td>this-device</td><td>現在のデバイス設定を変更します</td></tr><tr><td>Get-KeeperPasswordVisible</td><td></td><td>シークレットフィールドの表示/非表示設定を確認する</td></tr><tr><td>Set-KeeperPasswordVisible</td><td></td><td>パスワードフィールドを表示するか非表示にするかを設定する</td></tr><tr><td>New-KeeperRecordType</td><td></td><td>新しいカスタムKeeperレコードタイプを追加する</td></tr><tr><td>Edit-KeeperRecordType</td><td></td><td>既存のカスタムKeeperレコードタイプを更新する</td></tr><tr><td>Remove-KeeperRecordType</td><td></td><td>指定したIDのカスタムKeeperレコードタイプを削除する</td></tr><tr><td>Import-KeeperRecordTypes</td><td></td><td>JSONファイルからKeeperにカスタムレコードタイプをインポートする</td></tr><tr><td>Export-KeeperRecordTypes</td><td></td><td>KeeperボルトからJSONファイルにカスタムレコードタイプをエクスポートする</td></tr><tr><td>Get-KeeperRecordPassword</td><td></td><td>名前、タイトル、UID、またはレコードオブジェクトを指定してKeeperレコードのパスワードを取得する</td></tr><tr><td>Get-KeeperPasswordReport</td><td></td><td>Keeperレコードの包括的なパスワードセキュリティレポートを生成する</td></tr></tbody></table>

## 共有コマンドレット

<table><thead><tr><th>コマンドレット名</th><th width="165">エイリアス</th><th>説明</th></tr></thead><tbody><tr><td>Show-KeeperRecordShare</td><td>kshrsh</td><td>レコード共有情報を表示します</td></tr><tr><td>Grant-KeeperRecordAccess</td><td>kshr</td><td>ユーザーとレコードを共有します</td></tr><tr><td>Revoke-KeeperRecordAccess</td><td>kushr</td><td>ユーザーからレコード共有を削除します</td></tr><tr><td>Move-KeeperRecordOwnership</td><td>ktr</td><td>レコードの所有権をユーザーに譲渡します</td></tr><tr><td>Grant-KeeperSharedFolderAccess</td><td>kshf</td><td>共有フォルダにユーザーまたはチームを追加します</td></tr><tr><td>Revoke-KeeperSharedFolderAccess</td><td>kushf</td><td>共有フォルダからユーザーまたはチームを削除します</td></tr><tr><td>Get-KeeperAvailableTeam</td><td>kat</td><td>利用可能なチームを取得します</td></tr><tr><td>Get-KeeperOneTimeShare</td><td>kotsg</td><td>レコードのワンタイム共有を取得します</td></tr><tr><td>New-KeeperOneTimeShare</td><td>kotsn</td><td>ワンタイムシェアを作成します</td></tr><tr><td>Remove-KeeperOneTimeShare</td><td>kotsr</td><td>ワンタイムシェアを削除します</td></tr></tbody></table>

### エンタープライズコマンドレット

| コマンドレット名                          | エイリアス         | 説明                               |
| --------------------------------- | ------------- | -------------------------------- |
| Sync-KeeperEnterprise             | ked           | Keeperエンタープライズ情報を同期します           |
| Get-KeeperEnterpriseNode          | ken           | すべてのエンタープライズノードを列挙します            |
| Get-KeeperEnterpriseUser          | keu           | すべてのエンタープライズユーザーを列挙します           |
| Get-KeeperEnterpriseTeam          | ket           | すべてのエンタープライズチームを列挙します            |
| Get-KeeperEnterpriseTeamUser      | ketu          | チームのエンタープライズユーザーのリストを取得します       |
| New-KeeperEnterpriseNode          | kena          | ノードを作成します (新規)                   |
| Add-KeeperEnterpriseUser          | invite-user   | ユーザーをエンタープライズに招待します (新規)         |
| Lock-KeeperEnterpriseUser         | lock-user     | エンタープライズユーザーをロックします              |
| Unlock-KeeperEnterpriseUser       | unlock-user   | エンタープライズユーザーのロックを解除します           |
| Move-KeeperEnterpriseUser         | transfer-user | ユーザーアカウントを別のユーザーに移管します           |
| Remove-KeeperEnterpriseUser       | delete-user   | エンタープライズユーザーを削除します               |
| Get-KeeperEnterpriseRole          | ker           | すべてのエンタープライズ ロールを列挙します (新規)      |
| Get-KeeperMspLicenses             | msp-license   | MSPライセンスを返却します                   |
| Switch-KeeperMC                   | switch-to-mc  | 管理会社へ切り替えます (新規)                 |
| Switch-KeeperMSP                  | switch-to-msp | MSP に戻ります (新規)                   |
| Get-KeeperManagedCompany          | kmc           | エンタープライズ管理会社をすべて列挙します            |
| New-KeeperManagedCompany          | kamc          | 管理会社を作成します                       |
| Remove-KeeperManagedCompany       | krmc          | 管理対象会社を削除します                     |
| Edit-KeeperManagedCompany         | kemc          | 管理対象会社を編集します                     |
| Get-MspBillingReport              |               | MSP請求レポートを実行します                  |
| Get-KeeperNodeName                |               | 現在のエンタープライズノード名を取得します            |
| Get-KeeperRoleName                |               | エンタープライズロールの表示名を取得します            |
| New-KeeperEnterpriseTeam          |               | エンタープライズチームを作成します                |
| Get-KeeperEnterpriseRoleUsers     |               | 指定したロールに属するエンタープライズユーザーの一覧を取得します |
| Get-KeeperEnterpriseRoleTeams     |               | 指定したロールに属するエンタープライズチームの一覧を取得します  |
| Get-KeeperEnterpriseAdminRole     |               | 管理者権限の一覧を取得します                   |
| Remove-KeeperEnterpriseTeamMember |               | 既存のエンタープライズユーザーをKeeperチームから削除します |
| Add-KeeperEnterpriseTeamMember    |               | 既存のエンタープライズユーザーをKeeperチームに追加します  |

### シークレットマネージャーコマンドレット

| コマンドレット名                               | エイリアス         | 説明                                            |
| -------------------------------------- | ------------- | --------------------------------------------- |
| Get-KeeperSecretManagerApp             | ksm           | すべてのKeeperシークレットマネージャーアプリケーションを列挙します          |
| Add-KeeperSecretManagerApp             | ksm-create    | Keeperシークレットマネージャーアプリケーションを追加します              |
| Remove-KeeperSecretManagerApp          |               | Keeperシークレットマネージャーアプリケーションを削除します              |
| Grant-KeeperSecretManagerFolderAccess  | ksm-share     | KSMアプリケーションに共有フォルダを追加します                      |
| Revoke-KeeperSecretManagerFolderAccess | ksm-unshare   | KSM アプリケーションから共有フォルダを削除します                    |
| Add-KeeperSecretManagerClient          | ksm-addclient | KSMアプリケーションにクライアント/デバイスを追加します                 |
| Remove-KeeperSecretManagerClient       | ksm-rmclient  | KSMアプリケーションからクライアント/デバイスを削除します                |
| Grant-KeeperAppAccess                  |               | Keeperシークレットマネージャーアプリケーションへのアクセスをユーザーに付与します   |
| Revoke-KeeperAppAccess                 |               | Keeperシークレットマネージャーアプリケーションへのアクセスをユーザーから取り消します |
| Get-KeeperPasswordReport               |               | ポリシーおよび強度に基づいたパスワードレポートを取得します                 |

### BreachWatchコマンド

| コマンドレット名                            | エイリアス | 説明                                       |
| ----------------------------------- | ----- | ---------------------------------------- |
| Get-KeeperBreachWatchList           |       | BreachWatchに基づいて漏えいが確認されたパスワードの一覧を表示します。 |
| Test-PasswordAgainstBreachWatch     |       | 指定したパスワードがBreachWatchで漏えいしていないかを確認します。   |
| Set-KeeperBreachWatchRecordIgnore   |       | 指定したレコードをBreachWatchのアラート対象から除外します。      |
| Get-KeeperIgnoredBreachWatchRecords |       | BreachWatchで除外設定されているレコードの一覧を表示します。      |

### 生体認証ログインサポートコマンド

| コマンドレット名                                                                                                                                         | エイリアス | 説明                                           |
| ------------------------------------------------------------------------------------------------------------------------------------------------ | ----- | -------------------------------------------- |
| [Register-KeeperBiometricCredential](https://docs.keeper.io/jp/keeperpam/commander-cli/commander-installation-setup/biometric-login#komando-1)   |       | 新しい生体認証情報 (Windows Hello / WebAuthn) を登録します。 |
| [Assert-KeeperBiometricCredential](https://docs.keeper.io/jp/keeperpam/commander-cli/commander-installation-setup/biometric-login#komando-3)     |       | 現在のユーザーに生体認証情報が登録されているかを確認します。               |
| [Show-KeeperBiometricCredentials](https://docs.keeper.io/jp/keeperpam/commander-cli/commander-installation-setup/biometric-login#komando-2)      |       | 現在のユーザーに登録されているすべての生体認証情報を一覧表示します。           |
| [Unregister-KeeperBiometricCredential](https://docs.keeper.io/jp/keeperpam/commander-cli/commander-installation-setup/biometric-login#komando-4) |       | 現在のユーザーから生体認証情報を削除します。                       |

### コマンドの追加

PowerShellモジュールにはお客様からのリクエストに応じてKeeperコマンダー (Python) の機能を追加しておりますので、すべての機能が追加されているわけではありません。ご要望などございましたら、弊社のエンジニアリングチーム (<commander@keepersecurity.com>) までご連絡ください。

## **例**

Keeperアカウントに接続します。

```powershell
PS > Connect-Keeper
     Keeper Username: email_address@company.com
        ...Password:
```

Keeperフォルダの内容を一覧表示します。

```powershell
PS > kdir

    Vault Folder: \


Mode    UID                      Name
----    ---                      ----
f-----  b3TMAYfOWJqNxeLjlA6v_g   dasdasd
f----S  BvHeHGkdRJfhGaRcI-J5Ww   shared
-r-AO-  5qx_urh2EsrL0wBdi34nFw   Web
-r---S  ktY3jEBqwFDi9UYZSxmIpw   Control
```

* **f** - フォルダ
* **r** - レコード
* **S** - 共有
* **A** - ファイル添付
* **O** - 所有者

現在のKeeperフォルダ内のすべてのレコードの二要素コードを表示します。

```powershell
PS > kdir -ObjectType Record | Show-TwoFactorCode
```

ボルト内のすべてのレコードの二要素コードを表示します。

```powershell
PS > kr|2fa
```

* `kr` は `Get-KeeperRecords` のエイリアスです。
* `2fa` は `Show-TwoFactorCode` のエイリアスです

レコードのパスワードをクリップボードにコピーします。

```powershell
PS>'contro'|kcc
```

* `contro` はレコードタイトルの部分文字列です。上記の `kdir` 出力の最後のエントリをご参照ください。
* `kcc` は `Copy-KeeperToClipboard` のエイリアスです。

または

```powershell
PS > 'ktY3jEBqwFDi9UYZSxmIpw' | kcc
```

`'ktY3jEBqwFDi9UYZSxmIpw'` は同じレコードのレコードUIDです。

Keeperのレコードを追加/変更します。

```powershell
PS > kadd -Login email@company.com -GeneratePassword -URL https://company.com -Custom 'Name:John Doe' 'Record for John Doe'
```

Keeperのレガシーレコードを作成します。

```powershell
PS > kadd -RecordType login -Title 'Record for John Doe' -GeneratePassword login=email@company.com url=https://company.com 'User Name=John Doe' 
```

Keeperで `login` タイプのレコードを作成します。

```powershell
PS > $address = @{"street1" = "123 Main St."; "city" = "Neitherville"; "state" = "CA"; "zip" = "12345"}
PS > kadd -RecordType address -Title 'Home Address' -address $address phone.Home='(555)123-4567' name="Doe, John"
```

```powershell
PS > kadd -Uid <RECORD UID> -GeneratePassword 
```

既存のレコードに新しいパスワードを生成します。

レガシーレコードとタイプのあるレコードの両方でサポートされる定義済みフィールド

* `login` ログイン
* `password` パスワード
* `url` ウェブサイトアドレス

所有レコードをフォルダにコピーします。

```powershell
PS > Get-KeeperChildItem -ObjectType Record | Move-RecordToFolder 'Shared Folder'
```

現在のKeeperフォルダ内のすべてのレコードを「Shared Folder」という名前のフォルダにコピーします。

すべてのエンタープライズユーザーを一覧表示します。

```powershell
PS > Get-KeeperEnterpriseUser
```

新しい管理会社を作成します。

```powershell
PS> New-KeeperManagedCompany -Name "Company Name" -PlanId enterprisePlus -Allocated 5
```

新しい管理会社に切り替えます。

```powershell
PS> switch-to-mc "Company Name"
```


---

# 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/jp/keeperpam/commander-cli/commander-installation-setup/installation-on-powershell.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.
