Skip to content

Commit

Permalink
Version 4.16
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelGrafnetter committed Jan 5, 2025
1 parent 4374940 commit 67fa4fa
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 14 deletions.
11 changes: 11 additions & 0 deletions Documentation/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@

All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [4.16] - 2025-01-05

### Added

- The `DomainController` class exposes more DC properties, including `ServerObjectDN`, `NTDSSettingsObjectDN`, and `ForestRootNamingContext`.

### Fixed

- The [New-ADDBRestoreFromMediaScript](PowerShell/New-ADDBRestoreFromMediaScript.md#new-addbrestorefrommediascript) cmdlet now properly sets the `Configuration NC`, `Root Domain`, and `Machine DN Name` registry values under the `HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Parameters` key.

## [4.15.1] - 2025-01-02

This is a PowerShell-only bugfix release.
Expand Down Expand Up @@ -541,6 +551,7 @@ This is a [Chocolatey](https://chocolatey.org/packages/dsinternals-psmodule)-onl
Initial release!

[Unreleased]: https://github.com/MichaelGrafnetter/DSInternals/compare/v4.15.1...HEAD
[4.15.1]: https://github.com/MichaelGrafnetter/DSInternals/compare/v4.15.1...v4.16
[4.15.1]: https://github.com/MichaelGrafnetter/DSInternals/compare/v4.15...v4.15.1
[4.15]: https://github.com/MichaelGrafnetter/DSInternals/compare/v4.14...v4.15
[4.14]: https://github.com/MichaelGrafnetter/DSInternals/compare/v4.13...v4.14
Expand Down
2 changes: 1 addition & 1 deletion Src/DSInternals.DataStore/DSInternals.DataStore.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<description>DSInternals DataStore is an advanced framework for offline ntds.dit file manipulation. It can be used to extract password hashes from Active Directory backups or to modify the sIDHistory and primaryGroupId attributes.</description>
<summary>DSInternals DataStore is an advanced framework for offline ntds.dit file manipulation.</summary>
<releaseNotes>
- Minor credential roaming parser improvement.
- The `DomainController` class exposes more DC properties, including `ServerObjectDN`, `NTDSSettingsObjectDN`, and `ForestRootNamingContext`.
</releaseNotes>
<copyright>Copyright (c) 2015-2025 Michael Grafnetter. All rights reserved.</copyright>
<tags>ActiveDirectory Security NTDS AD Identity Active Directory</tags>
Expand Down
3 changes: 2 additions & 1 deletion Src/DSInternals.DataStore/DomainController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
/// </summary>
public class DomainController : IDisposable, IDomainController
{
// TODO: Refactor properties and add more of them to the IDomainController interface.
public const long UsnMinValue = 1;
public const long UsnMaxValue = long.MaxValue;
public const long EpochMinValue = 1;
Expand Down Expand Up @@ -101,7 +102,7 @@ public DomainController(DirectoryContext context)
this.ConfigurationNamingContext = context.DistinguishedNameResolver.Resolve(this.ConfigurationNamingContextDNT);

// Forest Root Domain NC should be the parent of the Configuration NC
this.ForestRootNamingContext = this.ConfigurationNamingContext.Parent
this.ForestRootNamingContext = this.ConfigurationNamingContext.Parent;

// Retrieve Schema Naming Context
this.SchemaNamingContextDNT = dataTableCursor.RetrieveColumnAsDNTag(schema.FindColumnId(CommonDirectoryAttributes.SchemaLocation)).Value;
Expand Down
4 changes: 2 additions & 2 deletions Src/DSInternals.DataStore/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("DSInternals DataStore Library")]
[assembly: AssemblyVersion("4.14")]
[assembly: AssemblyFileVersion("4.14")]
[assembly: AssemblyVersion("4.16")]
[assembly: AssemblyFileVersion("4.16")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2015/06/nuspec.xsd">
<metadata>
<id>DSInternals-PSModule</id>
<version>4.15.1</version>
<version>4.16</version>
<packageSourceUrl>https://github.com/MichaelGrafnetter/DSInternals/tree/master/Src/DSInternals.PowerShell/Chocolatey</packageSourceUrl>
<owners>MichaelGrafnetter</owners>
<title>DSInternals PowerShell Module</title>
Expand Down Expand Up @@ -37,7 +37,7 @@ The DSInternals PowerShell Module has these main features:
## Disclaimer
Features exposed through these tools are not supported by Microsoft. Improper use might cause irreversible damage to domain controllers or negatively impact domain security.</description>
<releaseNotes>
* The Test-PasswordQuality cmdlet should no longer return the AmbiguousParameterSet error.
* The `New-ADDBRestoreFromMediaScript` cmdlet now properly sets the `Configuration NC`, `Root Domain`, and `Machine DN Name` registry values under the `HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Parameters` key.
</releaseNotes>
<dependencies>
<!-- Windows Management Framework 3+. For OS prior to Windows 8 and Windows Server 2012. -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ protected override void ProcessRecord()
}
}

var dc = this.DirectoryContext.DomainController;
DomainController dc = this.DirectoryContext.DomainController;
if (this.SysvolPath == null)
{
// Presume that the database is part of an IFM backup:
Expand All @@ -86,13 +86,13 @@ protected override void ProcessRecord()
// TODO: Check backup expiration time

string winDir = Environment.GetFolderPath(Environment.SpecialFolder.Windows);
string targetDatabaseDirectory = Path.Combine(windir, "NTDS");
string targetDatabaseDirectory = Path.Combine(winDir, "NTDS");
string targetDatabasePath = Path.Combine(targetDatabaseDirectory, "ntds.dit");
string targetSysvolPath = Path.Combine(windir, "SYSVOL");
string targetSysvolPath = Path.Combine(winDir, "SYSVOL");

// Load the RFM script template and replace placeholders with values from the DB:
string template = LoadScriptTemplate();
var script = new StringBuilder(template).
StringBuilder script = new StringBuilder(template).
Replace("{DCName}", dc.Name).
Replace("{DCHostName}", dc.HostName).
Replace("{DCGuid}", dc.Guid.ToString()).
Expand Down
4 changes: 2 additions & 2 deletions Src/DSInternals.PowerShell/DSInternals.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
RootModule = 'DSInternals.Bootstrap.psm1'

# Version number of this module.
ModuleVersion = '4.15.1'
ModuleVersion = '4.16'

# Supported PSEditions
# CompatiblePSEditions = 'Desktop'
Expand Down Expand Up @@ -143,7 +143,7 @@ PrivateData = @{

# ReleaseNotes of this module
ReleaseNotes = @"
- The Test-PasswordQuality cmdlet should no longer return the AmbiguousParameterSet error.
- The New-ADDBRestoreFromMediaScript cmdlet now properly sets the "Configuration NC", "Root Domain", and "Machine DN Name" registry values under the "HKLM\SYSTEM\CurrentControlSet\Services\NTDS\Parameters" key.
"@
} # End of PSData hashtable

Expand Down
4 changes: 2 additions & 2 deletions Src/DSInternals.PowerShell/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("DSInternals PowerShell Commands")]
[assembly: AssemblyVersion("4.15.1")]
[assembly: AssemblyFileVersion("4.15.1")]
[assembly: AssemblyVersion("4.16")]
[assembly: AssemblyFileVersion("4.16")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
Expand Down

0 comments on commit 67fa4fa

Please sign in to comment.