> 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/active-directory-powershell-module.md).

# وحدة Active Directory لـ PowerShell

### الهدف

تتيح لك وحدة Active Directory استخدام أوامر مثل:

{% code overflow="wrap" %}

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

{% endcode %}

على وحدة تحكم بالمجال، تكون هذه الوحدة متوفرة عادةً افتراضيًا.

على جهاز Windows 10 التقليدي، غالبًا لا تكون مثبتة.

<figure><img src="/files/4d17141b7a9820b3c58eb6ae2e2ddefe026a88fd" alt=""><figcaption></figcaption></figure>

### تحميل معلومات المجال

على وحدة تحكم بالمجال:

```bash
Get-ADDomain
```

يعيد هذا الأمر معلومات مهمة مثل:

* اسم المجال؛
* معرّف الأمان (SID) للمجال؛
* الوضع الوظيفي للمجال؛
* الغابة؛
* وحدة تحكم المجال الأساسية؛
* المسؤول الرئيسي للبنية التحتية؛
* معلومات تهيئة Active Directory.

### استخدم الوحدة على جهاز بدون RSAT

يمكن جلب ملف DLL من وحدة تحكم المجال:

{% 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 %}

ثم ننسخه إلى `WS02`، ثم نستورده:

{% code overflow="wrap" %}

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

{% endcode %}

ثم يمكننا الاختبار:

{% code overflow="wrap" %}

```powershell
Get-ADDomain
```

{% endcode %}

<figure><img src="/files/8392f32759a01b6c07033cb479682ebda37eb408" alt=""><figcaption></figcaption></figure>

### بديل باستخدام PowerView

بدون وحدة Active Directory، يوفر PowerView أوامر مكافئة.

الحصول على معلومات المجال:

{% code overflow="wrap" %}

```powershell
Get-NetDomain
```

{% endcode %}

الحصول على سياسة المجال:

{% code overflow="wrap" %}

```powershell
Get-DomainPolicy
```

{% endcode %}

عرض `SystemAccess` القسم:

{% code overflow="wrap" %}

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

{% endcode %}

يتيح لك هذا الحصول على معلومات مثل:

* سياسة كلمات المرور؛
* قفل الحساب؛
* الحد الأقصى لعمر كلمة المرور؛
* إعدادات أمان المجال.


---

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