> For the complete documentation index, see [llms.txt](https://docs.stoik.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stoik.io/prevention-tools/ad-scan.md).

# Active Directory scan

The Active Directory scan analyzes the configuration of your on-premises Active Directory with the PingCastle tool and assesses its security level.

An Active Directory (AD) is a directory service provided by Microsoft operating systems. It lets the network administrator centralize user and machine authentication, manage permissions and control access to network resources. Attackers who target a company with an AD aim to become the system administrator: they then control all workstations and servers.

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><h4><i class="fa-gear">:gear:</i></h4></td><td><h4>Setup</h4></td><td>Download the script and run it on a domain-joined machine.</td><td><a href="/prevention-tools/ad-scan/setup.md">Setup</a></td></tr><tr><td><h4><i class="fa-chart-line">:chart-line:</i></h4></td><td><h4>Reading results</h4></td><td>Understand the risk score and each detected vulnerability.</td><td><a href="/prevention-tools/ad-scan/results.md">Reading results</a></td></tr><tr><td><h4><i class="fa-triangle-exclamation">:triangle-exclamation:</i></h4></td><td><h4>Setup errors</h4></td><td>Fix the errors the script prints when it fails.</td><td><a href="/prevention-tools/ad-scan/setup-errors.md">Setup errors</a></td></tr><tr><td><h4><i class="fa-circle-question">:circle-question:</i></h4></td><td><h4>Common questions</h4></td><td>What the script is allowed to do and what it sends to Stoïk.</td><td><a href="/prevention-tools/ad-scan/common-questions.md">Common questions</a></td></tr></tbody></table>

## What the scan identifies

The scan identifies:

* Outdated objects: systems that are too old or obsolete.
* Overly permissive trust relationships.
* Overly permissive user permissions.
* Anomalies, such as weak password policies.

The results highlight potential vulnerabilities, classified into four levels: low, medium, high and critical. If a vulnerability is detected, click each misconfiguration to see the remediation steps.

{% hint style="info" %}
Two types of Active Directory coexist at Microsoft:

* An on-premises Active Directory, analyzed by the Active Directory scan.
* An Azure Cloud Active Directory, also called Entra ID, whose configurations are analyzed by the [Cloud scan](/prevention-tools/cloud-scan.md).
  {% endhint %}


---

# 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.stoik.io/prevention-tools/ad-scan.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.
