> For the complete documentation index, see [llms.txt](https://hacking-notes.jord4n.pro/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hacking-notes.jord4n.pro/de/active-directory/enumeration/active-directory-powershell-module.md).

# Active-Directory-PowerShell-Modul

### Ziel

Das Active-Directory-Modul ermöglicht Ihnen die Verwendung von Befehlen wie:

{% code overflow="wrap" %}

```powershell
Get-ADDomain
Get-ADUser
Get-ADComputer
Get-ADDomainController
```

{% endcode %}

Auf einem Domänencontroller ist dieses Modul in der Regel standardmäßig verfügbar.

Auf einem klassischen Windows-10-Rechner ist es oft nicht installiert.

<figure><img src="/files/cd2c118c8d163aa9f2264d046cd392d2432692d3" alt=""><figcaption></figcaption></figure>

### Domäneninformationen laden

Auf dem Domänencontroller:

```bash
Get-ADDomain
```

Dieser Befehl liefert wichtige Informationen wie:

* den Namen der Domäne;
* die SID der Domäne;
* den Funktionsmodus der Domäne;
* die Gesamtstruktur;
* den primären Domänencontroller;
* den Infrastrukturmaster;
* AD-Konfigurationsinformationen.

### Das Modul auf einem Rechner ohne RSAT verwenden

Die DLL kann vom DC abgerufen werden:

{% code overflow="wrap" %}

```bash
C:/Windows/Microsoft.Net/assembly/GAC_64/Microsoft.ActiveDirectory.Management/v4.0_10.0.0.0__31bf3856ad364e35/Microsoft.ActiveDirectory.Management.dll
```

{% endcode %}

Wir kopieren sie dann nach `WS02`, und importieren sie dann:

{% code overflow="wrap" %}

```powershell
Import-Module ./Microsoft.ActiveDirectory.Management.dll
```

{% endcode %}

Dann können wir testen:

{% code overflow="wrap" %}

```powershell
Get-ADDomain
```

{% endcode %}

<figure><img src="/files/d453f35332cee7d905cb57706bd75c13ce999b00" alt=""><figcaption></figcaption></figure>

### Alternative mit PowerView

Ohne ein Active-Directory-Modul bietet PowerView gleichwertige Befehle.

Domäneninformationen abrufen:

{% code overflow="wrap" %}

```powershell
Get-NetDomain
```

{% endcode %}

Die Domänenrichtlinie abrufen:

{% code overflow="wrap" %}

```powershell
Get-DomainPolicy
```

{% endcode %}

Anzeige des `SystemAccess` Abschnitts:

{% code overflow="wrap" %}

```powershell
(Get-DomainPolicy)."SystemAccess"
```

{% endcode %}

Dadurch können Sie Informationen erhalten wie:

* Passwortrichtlinie;
* Kontosperrung;
* das maximale Passwortalter;
* Domänensicherheitseinstellungen.


---

# 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 dynamically by asking a question.

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

```
GET https://hacking-notes.jord4n.pro/de/active-directory/enumeration/active-directory-powershell-module.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
