> For the complete documentation index, see [llms.txt](https://help.aikido.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.aikido.dev/docs/docs-ja/mashinsukyan/local-vm-scanning/setting-up-the-local-vm-scanner-windows.md).

# WindowsでローカルVMスキャナーを設定する

Aikido VM Scannerは、システムにインストールされる単一パッケージで、依存関係を自動的にスキャンして識別し、環境の詳細な把握を提供します。

### 前提条件

* 最小システム要件: RAMは少なくとも1GBです。
* 推奨システム要件: RAMは少なくとも2GB、CPUは4基です。
* システムで管理者権限があることを確認してください
* ご利用のシステムまたはクラウドプロバイダーに適したコマンドを使用してください
* [Windows では、PowerShell がインストールされ、有効になっていることを確認してください](https://learn.microsoft.com/en-us/powershell/scripting/install/installing-powershell-on-windows?view=powershell-7.5)

### インストールとアップグレード

PowerShellを管理者モードで起動し、 `AIKIDO_TOKEN` と [Aikido の Local VM scanning ページの有効なトークン](https://app.aikido.dev/settings/integrations/vm-scan-agent)。以下の任意のパラメータも指定できます:

* `VM_TYPE` 次のいずれかとして: `本番`, `staging` または `development`.
* `OUTPUT` 次のいずれかとして: `stdout`, `stderr` または `なし`.
* `INITIAL_SCAN` 次のいずれかとして: `1` または `0`.

```
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
Invoke-WebRequest -Uri "https://aikido-vm-agent.s3.eu-west-1.amazonaws.com/v1.5.0/AikidoVmScanner.msi" -OutFile "AikidoVmScanner.msi"
msiexec /i AikidoVmScanner.msi /qn /norestart AIKIDO_TOKEN=REPLACE_ME VM_TYPE=production OUTPUT=stdout INITIAL_SCAN=1
```

<table><thead><tr><th width="99.64453125">ハッシュ</th><th>AikidoVmScanner.msi</th></tr></thead><tbody><tr><td>MD5</td><td>49ad0e0646b545385ca277e10cc6f753</td></tr><tr><td>SHA256</td><td>92ec7c8729ea0b7d81e34964de8963de4c020f3e8a156afd7c5d3ff4c8e0272f</td></tr></tbody></table>

インストールを自動化していて、常に最新バージョンを使いたい場合は、次のリンクを使用できます:

* <https://aikido-vm-agent.s3.eu-west-1.amazonaws.com/latest/AikidoVmScanner.msi>

VM Scanner Agent は1日1回、次の間のランダムな時刻に実行されます **午前4:00 - 午前8:00** （マシン時刻）

インストール後、 **初回スキャンが自動的に開始されます**。必要に応じて実行したい場合は、管理者権限の PowerShell で次のコマンドを手動で実行できます。

```powershell
& 'C:\Program Files\AikidoVmScanner\AikidoVmScanner.exe'
```

### プロキシ経由で接続する

マシンが社内プロキシ経由でインターネットに接続している場合、VM Scanner は標準の `HTTPS_PROXY`, `HTTP_PROXY`、および `NO_PROXY` 環境変数からそれを取得します。これらが設定されていない場合は、WinHTTP の既定値や PAC スクリプトを含む Windows のシステム プロキシ設定にフォールバックします。 `config.json` にはプロキシオプションがなく、有効化する必要もありません。

スキャン自体は完全にローカルで実行されます。外向きの通信は HTTPS（ポート 443）で次の宛先にのみ行われます: `bg.aikido.dev`、または `bg.us.aikido.dev`.

{% hint style="info" %}
プロキシ対応はバージョン 1.4.5 以降で利用できます。
{% endhint %}

#### 日次スキャンのプロキシ設定

日次スキャンは SYSTEM アカウント下のスケジュールタスクとして実行されるため、変数はマシンレベルで設定する必要があります。自分のユーザーアカウント用に設定したプロキシは SYSTEM からは見えません。管理者 PowerShell で:

```powershell
[Environment]::SetEnvironmentVariable("HTTPS_PROXY", "http://proxy.example.com:8080", "Machine")
[Environment]::SetEnvironmentVariable("NO_PROXY", "localhost,127.0.0.1", "Machine")
```

プロキシに認証が必要な場合は、URL に認証情報を含めてください: `http://user:password@proxy.example.com:8080`.

環境変数の代わりに、スキャナーも認識するマシン全体の WinHTTP プロキシを設定できます:

```powershell
netsh winhttp set proxy proxy-server="http=proxy.example.com:8080;https=proxy.example.com:8080" bypass-list="localhost;127.0.0.1"
```

#### SSL インスペクションを行うプロキシ

プロキシが社内 CA で署名された証明書に置き換える場合は、その CA をマシンの信頼されたルート ストアにインポートしてください。管理者 PowerShell で:

```powershell
Import-Certificate -FilePath "C:\path\to\corporate-ca.crt" -CertStoreLocation Cert:\LocalMachine\Root
```

#### プロキシが使用されていることの確認

各実行では、検出したプロキシがログの次の場所に記録されます: `C:\ProgramData\AikidoVmScanner\Logs`:

```
プロキシ http://proxy.example.com:8080 を https://bg.aikido.dev/api/integrations/vm_scan/uploadScanResult に使用中
```

プロキシが検出されない場合は、次が表示されます: `プロキシが ... に対して検出されませんでした。直接接続しています` の代わりに。

### アンインストール

PowerShell を管理者モードで起動して、次を実行してください:

```powershell
msiexec.exe /x (Get-WmiObject -Class Win32_Product | Where-Object { $_.Name -like "AikidoVmScanner*" }).IdentifyingNumber /qn /norestart
```

### ログ

ログはここにあり、最後に生成された SBOM もあります: `C:\ProgramData\AikidoVmScanner\Logs`


---

# 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://help.aikido.dev/docs/docs-ja/mashinsukyan/local-vm-scanning/setting-up-the-local-vm-scanner-windows.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.
