Directory Services Internals (DSInternals) PowerShell Module and Framework
See the code

The DSInternals project consists of these two parts:
ntds.dit and the live directory over LDAP, export to standard zone files, and extraction of DNSSEC Key Signing Keys (KSK) and Zone Signing Keys (ZSK), with private keys decrypted using KDS root keys.[!WARNING] Features exposed through these tools are not supported by Microsoft. Improper use might cause irreversible damage to domain controllers or negatively impact domain security.
I have created these tools in my spare time and I am using them while performing AD security audits and also in my lectures to demonstrate how Active Directory works internally.
I would like to thank all people who have contributed to the project by sending their feedback or by submitting their code. In case you would also like to help with this project, please see the CONTRIBUTING document.
You can install the DSInternals module directly from the official PowerShell Gallery by running the following command:
Install-Module DSInternals -Force
Additional steps might be required on some freshly installed computers before DSInternals can be downloaded:
# TLS 1.2 must be enabled on older versions of Windows.
[System.Net.ServicePointManager]::SecurityProtocol =
[System.Net.ServicePointManager]::SecurityProtocol -bor [System.Net.SecurityProtocolType]::Tls12
# Download the NuGet package manager binary.
Install-PackageProvider -Name NuGet -Force
# Register the PowerShell Gallery as package repository if it is missing for any reason.
if($null -eq (Get-PSRepository -Name PSGallery -ErrorAction SilentlyContinue)) {
Register-PSRepository -Default
}
# Download the DSInternals PowerShell module.
Install-Module -Name DSInternals -Force
The DSInternals PowerShell Module can also be installed using the official Chocolatey package by executing the following Chocolatey command:
choco install dsinternals-psmodule --confirm
This package is self-contained and it will also install all dependencies. Note that package versions prior to 3.5 were not official.
The DSInternals PowerShell Module can also be installed using the WAPT package.
The package can be installed by the WAPT console or by the WAPT Command-line interface like so:
wapt-get install dsinternals
This package is self-contained and it will also install all dependencies.
Unblock-File cmdlet. If you fail to do so, all the extracted DLLs will inherit this attribute and PowerShell will refuse to load them.Import-Module cmdlet.The DSInternals PowerShell module is part of FireEye's Commando VM, the Windows-based alternative to Kali Linux.
The easiest way of integrating the DSInternals functionality into .NET applications is by using the DSInternals Framework NuGet packages:
You can of course download the source code, perform a review, and compile the Module/Framework yourself. See the CONTRIBUTING guide for more info.
The online version of PowerShell Get-Help documentation contains the list of all cmdlets and some usage examples.
I have also published a series of articles about the DSInternals module on my blog. Here are a few of them:
This project utilizes the following 3rd party copyrighted material:
317 followers · starred Oct 2020
97 followers · starred Jan 2026
410 followers · starred Dec 2015
67 followers · starred Oct 2021
Directory Services Internals (DSInternals) PowerShell Module and Framework
See the code

The DSInternals project consists of these two parts:
ntds.dit and the live directory over LDAP, export to standard zone files, and extraction of DNSSEC Key Signing Keys (KSK) and Zone Signing Keys (ZSK), with private keys decrypted using KDS root keys.[!WARNING] Features exposed through these tools are not supported by Microsoft. Improper use might cause irreversible damage to domain controllers or negatively impact domain security.
I have created these tools in my spare time and I am using them while performing AD security audits and also in my lectures to demonstrate how Active Directory works internally.
I would like to thank all people who have contributed to the project by sending their feedback or by submitting their code. In case you would also like to help with this project, please see the CONTRIBUTING document.
You can install the DSInternals module directly from the official PowerShell Gallery by running the following command:
Install-Module DSInternals -Force
Additional steps might be required on some freshly installed computers before DSInternals can be downloaded:
# TLS 1.2 must be enabled on older versions of Windows.
[System.Net.ServicePointManager]::SecurityProtocol =
[System.Net.ServicePointManager]::SecurityProtocol -bor [System.Net.SecurityProtocolType]::Tls12
# Download the NuGet package manager binary.
Install-PackageProvider -Name NuGet -Force
# Register the PowerShell Gallery as package repository if it is missing for any reason.
if($null -eq (Get-PSRepository -Name PSGallery -ErrorAction SilentlyContinue)) {
Register-PSRepository -Default
}
# Download the DSInternals PowerShell module.
Install-Module -Name DSInternals -Force
The DSInternals PowerShell Module can also be installed using the official Chocolatey package by executing the following Chocolatey command:
choco install dsinternals-psmodule --confirm
This package is self-contained and it will also install all dependencies. Note that package versions prior to 3.5 were not official.
The DSInternals PowerShell Module can also be installed using the WAPT package.
The package can be installed by the WAPT console or by the WAPT Command-line interface like so:
wapt-get install dsinternals
This package is self-contained and it will also install all dependencies.
Unblock-File cmdlet. If you fail to do so, all the extracted DLLs will inherit this attribute and PowerShell will refuse to load them.Import-Module cmdlet.The DSInternals PowerShell module is part of FireEye's Commando VM, the Windows-based alternative to Kali Linux.
The easiest way of integrating the DSInternals functionality into .NET applications is by using the DSInternals Framework NuGet packages:
You can of course download the source code, perform a review, and compile the Module/Framework yourself. See the CONTRIBUTING guide for more info.
The online version of PowerShell Get-Help documentation contains the list of all cmdlets and some usage examples.
I have also published a series of articles about the DSInternals module on my blog. Here are a few of them:
This project utilizes the following 3rd party copyrighted material:
317 followers · starred Oct 2020
97 followers · starred Jan 2026
410 followers · starred Dec 2015
67 followers · starred Oct 2021