Jorge's Quest For Knowledge!

All About Identity, Security, Recovery And Some Other Mic Stuff – It's Just Like An Addiction, The More You Have, The More You Want To Have!

(2026-01-09) Oh Crap, An Application Partition Was Deleted From The AD Forest! – How To Restore It Back?

Posted by Jorge on 2026-01-09


Some days ago I was reading REDDIT and stumbled across this post, where someone mistakenly deleted a DNS application partition. I responded to that post by providing steps on how to recover. In addition I also wanted to refresh my memory and see if i had written down was correct or not. All I wrote in that REDDIT post was correct with the addition of having forgotten 1 important step!

WARNING: The steps listed here apply to restoring a deleted Application Partition in Active Directory. These steps DO NOT apply to restoring a deleted AD Domain!

To test this all out I used the following TEST environment:

  • AD Forest: IAMTEC.NET
  • Forest Root AD Domain: IAMTEC.NET –> 3x live RWDCs – W2K19 – R1FSRWDC1 (All Forest And Domain FSMO Roles), R1FSRWDC2, R1FSRWDC3) and 1x live RODC (W2K19 – R1FSRODC1) and 1x bogus RODC (RIVERBED)
    • Child AD Domain: CHLD.IAMTEC.NET –> 2x RWDCs – W2K19 – C1FSRWDC1 (All Domain FSMO Roles), C1FSRWDC2
  • Tree Root AD Domain: TROOT.NET –> 2x RWDCs – W2K19 – T1FSRWDC1 (All Domain FSMO Roles), T1FSRWDC2
  • All DCs are a GC
  • DNS is externally hosted, no DNS data in AD!
  • Backup/Recovery Solution: Semperis ADFR

As I did not have DNS in AD, i could not test the 100% exact scenario of the OP of the REDDIT post.

To simulate the scenario, I had to create an application partition first to test with, and I also enlisted all live RWDCs and RODCs in the AD forest!

NTDSUTIL
ACTIVATE INSTANCE NTDS
PARTITION MANAGEMENT
CONNECTIONS
CONNECT TO SERVER R1FSRWDC1.IAMTEC.NET
Q
CREATE NC DC=APP_NC_TEST R1FSRWDC1.IAMTEC.NET
ADD NC REPLICA DC=APP_NC_TEST R1FSRWDC2.IAMTEC.NET
ADD NC REPLICA DC=APP_NC_TEST R1FSRWDC3.IAMTEC.NET
ADD NC REPLICA DC=APP_NC_TEST R1FSRODC1.IAMTEC.NET
ADD NC REPLICA DC=APP_NC_TEST C1FSRWDC1.CHLD.IAMTEC.NET
ADD NC REPLICA DC=APP_NC_TEST C1FSRWDC2.CHLD.IAMTEC.NET
ADD NC REPLICA DC=APP_NC_TEST T1FSRWDC1.TROOT.NET
ADD NC REPLICA DC=APP_NC_TEST T1FSRWDC2.TROOT.NET
Q
Q
Figure 1: Creating The Application Partition And Enlisting Additional DCs To Host It

Gave the DCs some minutes to replicate the partition data around.

Figure 2: The Definition (I.e., crossRef Object) Of The Application Partition

After this, I created a full backup of the AD forest using Semperis ADFR. After having confirmed the backup had completed successfully, it was time to start with the “mistaken” deletion. I used the following code to delete the application partition

NTDSUTIL
ACTIVATE INSTANCE NTDS
PARTITION MANAGEMENT
CONNECTIONS
CONNECT TO SERVER R1FSRWDC1.IAMTEC.NET
Q
LIST NC REPLICAS DC=APP_NC_TEST
DELETE NC DC=APP_NC_TEST
Q
Q
Figure 3: Listing The DCs That Host The Application Partition And Deleting The Application Partition

Gave the DCs some minutes to replicate the deletion of the partition data around.

To make sure all was deleted I used the following code:

(Get-ADForest).Domains | ForEach-Object {(Get-ADDomain -Identity $_).ReplicaDirectoryServers + (Get-ADDomain -Identity $_).ReadOnlyReplicaDirectoryServers | ForEach-Object {$dcFQDN = $_; Try{$events = Get-WinEvent -ComputerName $dcFQDN -FilterHashtable @{LogName = 'Directory Service'; ID = 1660} -ErrorAction STOP; $events | Format-Table @{Label="DC FQDN"; Expression={$dcFQDN}},TimeCreated,LevelDisplayName,Message -Wrap -AutoSize} CATCH {Write-Host "$dcFQDN - NO EVENTS YET... PATIENCE AND RETRY" -ForegroundColor Red}}}

With the following event from every DC hosting the partition, I knew for sure the partition did not exist anywhere anymore!

Figure 4: Confirming The Partition Was Deleted/Removed On All DCs In The AD Forest (In This Case!)

After the deletion of the data, I used Semperis ADFR to non-authoritatively restore the DC R1FSRWDC2.IAMTEC.NET using the most recent backup created.

Figure 5a: Non-Authoritative Restore Using Semperis ADFR

Figure 5b: Non-Authoritative Restore Using Semperis ADFR

Figure 5c: Non-Authoritative Restore Using Semperis ADFR

After the non-authoritative restore the DC R1FSRWDC2.IAMTEC.NET, I confirmed that INbound AD replication was disabled. This is needed to be able to authoritatively restore some objects to bring back the deleted partition. If this would not be done, more recent data in the AD Domain/Forest would update the restored DC as if nothing had happened.

Figure 6: Confirming Inbound AD Replication Was Disabled To Prevent Overwriting The Data Of The Non-Authoritative Restore

In this state I wanted to check the state of the objects of interest on both the restored DC R1FSRWDC2.IAMTEC.NET and some other DC R1FSRWDC1.IAMTEC.NET

LEFT WINDOW (RESTORED CROSS-REF OBJECT OF THE PARTITION):

REPADMIN /SHOWOBJMETA $ENV:COMPUTERNAME "CN=0fb7a89d-b871-4ba7-9fec-6b75ac77d455,CN=Partitions,CN=Configuration,DC=IAMTEC,DC=NET"

RIGHT WINDOW (NO CROSS-REF OBJECT OF THE PARTITION EXISTS (YET) AS IT IS DELETED):

REPADMIN /SHOWOBJMETA R1FSRWDC1.IAMTEC.NET "CN=0fb7a89d-b871-4ba7-9fec-6b75ac77d455,CN=Partitions,CN=Configuration,DC=IAMTEC,DC=NET"
Figure 7: Comparing Cross-Ref Objects On Both The Restored DC And Another DC

LEFT WINDOW (NTDS SETTINGS OBJECT OF THE RESTORED DC ON THE RESTORED DC):

REPADMIN /SHOWOBJMETA $ENV:COMPUTERNAME "CN=NTDS Settings,CN=R1FSRWDC2,CN=Servers,CN=DTCNTR01,CN=Sites,CN=Configuration,DC=IAMTEC,DC=NET"

RIGHT WINDOW (NTDS SETTINGS OBJECT OF THE RESTORED DC ON ANOTHER DC):

REPADMIN /SHOWOBJMETA R1FSRWDC1.IAMTEC.NET "CN=NTDS Settings,CN=R1FSRWDC2,CN=Servers,CN=DTCNTR01,CN=Sites,CN=Configuration,DC=IAMTEC,DC=NET"

Figure 8a: Comparing NTDS Settings Object Of The Restored DC On Both The Restored DC And Another DC – Differences Exist

Figure 8b: Comparing NTDS Settings Object Of The Restored DC On Both The Restored DC And Another DC – Differences Exist

Now lets analyze what needs to be done! Before the non-authoritative restore the application partition “DC=APP_NC_TEST” does not exist on any DC and its definition (i.e. cross-ref object) does also not exist. The question is “how to bring back (i.e., restore) the deleted application partition?”.

One way to restore the deleted the deleted application partition “DC=APP_NC_TEST” is to perform a full AD forest restore using the most recent backup that still contains the application partition. Although a solution, that would be some serious overkill, and let alone the huge impact on the environment!

So, IMHO, the best way to bring back the deleted application partition “DC=APP_NC_TEST” is to use the most recent backup available of any DC that actually hosted the partition, following up with some additional actions.

In my case, I use the DC R1FSRWDC2.IAMTEC.NET to perform an NON-authoritative restore. Now for the follow up actions, my logic is as follows, while using the following code that also executed on the restored DC R1FSRWDC2.IAMTEC.NET (!):

Stop-Service NTDS -Force
CD C:\TEMP
NTDSUTIL
ACTIVATE INSTANCE NTDS
AUTHORITATIVE RESTORE

At first we need to bring back the definition of the application partition. That is done by authoritatively restoring the cross-ref object of the deleted application partition.

RESTORE OBJECT "CN=0fb7a89d-b871-4ba7-9fec-6b75ac77d455,CN=Partitions,CN=Configuration,DC=IAMTEC,DC=NET"
Figure 9a: Authoritative Restore Of The Cross-Ref Object On The Restored DC

Figure 9b: Authoritative Restore Of The Cross-Ref Object On The Restored DC

Now when you look at the data:

  • The cross-ref object lists which DCs (a.k.a. replica locations) host the application partition
  • The NTDS Settings object of each DC lists, across multiple attributes, which partitions (a.k.a. NCs) are hosted the corresponding DC

The first bullet has already been authoritatively restored, so that is done! However, the data of the NTDS Settings object of the restored DC on the restored DC itself is older than the data of the NTDS Settings object of the restored DC on any other DC. Check the differences in figure 8a and 8b. On the left you can see the NTDS Settings object shows that R1FSRWDC2.IAMTEC.NET hosts the application partition and on the right you can see the NTDS Settings object shows that R1FSRWDC2.IAMTEC.NET DOES NOT host the application partition. Obviously we want the version on the left to take priority. In other words, if the NTDS Settings object of the restored DC on the restored DC is not authoritatively restored, the restored DC will have the actual application partition, but other DCs WILL NOT be able to replicate from it as its NTDS Settings object does not specify the hosts the application partition. Although specified as a Replica Location, other DCs will not be able to inbound replicate and host the application data as they cannot find another DC that hosts (i.e., has instantiated) the actual partition. The restored DC, although being a Replica Location, having the data, but not having specified it has it instantiated, will not be able to service replication requests from other DCs. Something similar like the following would be seen.

Figure 10: DCs Defined As Replica Locations But Not Being Able To Instantiate The Application Partition

The solution? Also perform an authoritative restore of the NTDS Settings object of the restored DC on the restored DC. After that the NTDS Service again.

RESTORE OBJECT "CN=NTDS Settings,CN=R1FSRWDC2,CN=Servers,CN=DTCNTR01,CN=Sites,CN=Configuration,DC=IAMTEC,DC=NET"
Q
Q
Start-Service NTDS
Figure 11a: Authoritative Restore Of The NTDS Settings Object Of The Restored DC On The Restored DC

Figure 11b: Authoritative Restore Of The NTDS Settings Object Of The Restored DC On The Restored DC

Now you might also think that it is also needed to authoritatively restore the actual partition itself. That is not needed as nothing from that partition exists on the other DCs, and there is nothing to overwrite. The partition and its data are not in a deleted state, but rather have been fully deleted. In short, authoritative restore of the actual partition is not needed.

After the restore, OUTbound AD replication is forced on the restored DC so that the changes propagate to other DCs.

Figure 12: Forcing Outbound AD Replication On The Restored DC For The Changes To Propagate To Other DCs

LEFT WINDOW (NTDS SETTINGS OBJECT OF THE RESTORED DC ON THE RESTORED DC):

REPADMIN /SHOWOBJMETA $ENV:COMPUTERNAME "CN=NTDS Settings,CN=R1FSRWDC2,CN=Servers,CN=DTCNTR01,CN=Sites,CN=Configuration,DC=IAMTEC,DC=NET"

RIGHT WINDOW (NTDS SETTINGS OBJECT OF THE RESTORED DC ON ANOTHER DC):

REPADMIN /SHOWOBJMETA R1FSRWDC1.IAMTEC.NET "CN=NTDS Settings,CN=R1FSRWDC2,CN=Servers,CN=DTCNTR01,CN=Sites,CN=Configuration,DC=IAMTEC,DC=NET"

Figure 13a: Comparing NTDS Settings Object Of The Restored DC On Both The Restored DC And Another DC – NO Differences Exist

Figure 13b: Comparing NTDS Settings Object Of The Restored DC On Both The Restored DC And Another DC – NO Differences Exist

It is now time to enable INbound AD Replication on the restored DC.

REPADMIN.EXE /HOMESERVER:$ENV:COMPUTERNAME /OPTIONS $ENV:COMPUTERNAME -DISABLE_INBOUND_REPL

Forcing OUTbound AD Replication on the restored DC

REPADMIN.EXE /SYNCALL $ENV:COMPUTERNAME /edjqAP

Figure 14: Forcing Outbound AD Replication On The Restored DC For The Changes To Propagate To Other DCs

Forcing INbound AD Replication on the restored DC

REPADMIN.EXE /SYNCALL $ENV:COMPUTERNAME /edjqA

The error below can be expected if a certain DC has not (yet) instantiated the application partition

Figure 15: Forcing Inbound AD Replication On The Restored DC To Receive Any Updates From Other DCs

As of this point in the process all the other Replica Locations, as defined on the cross-ref object, that have nothing instantiated, will instantiate the application partition and inbound replicate the data from any other DC that already has instantiated the application partition, and in this case it is the DC R1FSRWDC2.IAMTEC.NET.

Checking which Replica Locations exist and which have instantiated the application partition.

NTDSUTIL
ACTIVATE INSTANCE NTDS
PARTITION MANAGEMENT
CONNECTIONS
CONNECT TO SERVER R1FSRWDC1.IAMTEC.NET
Q
LIST NC REPLICAS DC=APP_NC_TEST
Q
Q
Figure 16: Listing The Replica Locations Of The Application Partition And Their Instantiation State – Not (Yet) Complete

As you can see above, not all DCs (i.e., Replica Locations) have completed the operation. Just give it time to complete, especially when having many DCs hosting the application partition and lots of data is involved.

Figure 17: Listing The Replica Locations Of The Application Partition And Their Instantiation State – Completed!

Because of the restore of the application partition and the (re-)instantiation of the application partition, every DC hosting the application partition will report through event ID 1587 in the Directory Services Event Log it is processing the new Invocation IDs of each DC that instantiated the partition. To get assurance the process is working, I only need to see 1 Event on every DC as it otherwise could be an overload of data.

(Get-ADForest).Domains | ForEach-Object {(Get-ADDomain -Identity $_).ReplicaDirectoryServers + (Get-ADDomain -Identity $_).ReadOnlyReplicaDirectoryServers | ForEach-Object {$dcFQDN = $_; Try{$events = Get-WinEvent -ComputerName $dcFQDN -FilterHashtable @{LogName = 'Directory Service'; ID = 1587} -MaxEvents 1 -ErrorAction STOP; $events | Format-Table @{Label="DC FQDN"; Expression={$dcFQDN}},TimeCreated,LevelDisplayName,Message -Wrap -AutoSize} CATCH {Write-Host "$dcFQDN - NO EVENTS YET... PATIENCE AND RETRY (UNLESS IT IS AN RODC, A DECOMMISSIONED DC, ETC)" -ForegroundColor Red}}}

Figure 18a: Every Replica Location (I.e., Every DC Hosting) Of The Application Partition Is Processing The New Invocation ID Of Each That Instantiated The Application Partition

Figure 18b: Every Replica Location (I.e., Every DC Hosting) Of The Application Partition Is Processing The New Invocation ID Of Each That Instantiated The Application Partition

Figure 18c: Every Replica Location (I.e., Every DC Hosting) Of The Application Partition Is Processing The New Invocation ID Of Each That Instantiated The Application Partition

Figure 18d: Every Replica Location (I.e., Every DC Hosting) Of The Application Partition Is Processing The New Invocation ID Of Each That Instantiated The Application Partition

And as I final step, I want to make sure all Replica Location are fully functioning for the application partition. You can easily do that through the PowerShell script SCRIPT: Check-AD-Replication-Latency-Convergence

Figure 19a: Checking The Restored Application Partition On Every DC Hosting It And The AD Replication Between each

Figure 19b: Checking The Restored Application Partition On Every DC Hosting It And The AD Replication Between each

Figure 19c: Checking The Restored Application Partition On Every DC Hosting It And The AD Replication Between each

Figure 19d: Checking The Restored Application Partition On Every DC Hosting It And The AD Replication Between each

Figure 19e: Checking The Restored Application Partition On Every DC Hosting It And The AD Replication Between each

Figure 19f: Checking The Restored Application Partition On Every DC Hosting It And The AD Replication Between each

Everything is now back to normal again! Hope this helps someone, if this mistake occurs. Remember, although there are similarities, THESE STEPS CANNOT BE USED FOR RESTORING A DELETED DOMAIN!

Cheers,

Jorge

————————————————————————————————————————————————————-
This posting is provided “AS IS” with no warranties and confers no rights!
Always evaluate/test everything yourself first before using/implementing this in production!
This is today’s opinion/technology, it might be different tomorrow and will definitely be different in 10 years!
DISCLAIMER: https://jorgequestforknowledge.wordpress.com/disclaimer/

————————————————————————————————————————————————————-
########################### IAMTEC | Jorge’s Quest For Knowledge ##########################
#################### https://jorgequestforknowledge.wordpress.com/ ###################

————————————————————————————————————————————————————

IAMTEC

Identity | Security | Recovery

————————————————————————————————————————————————————-

Posted in Active Directory Domain Services (ADDS), Active Directory Forest Recovery (ADFR), Forest Recovery, Partition Deletion/Restore | Tagged: , , , , | Leave a Comment »

(2025-11-15) Renaming Domain Controllers – Without Breaking It

Posted by Jorge on 2025-11-15


I have not done this for quit some time, but because of a silly mistake I made in my test lab, I needed to rename the domain controller. Because of how it went, I wanted to share the experience of how it went wrong and also how I solved it.

Many years ago, if you wanted to rename a domain controller you had to use NETDOM. Then after some it was also possible to rename through the GUI, which made it easier. Change name, reboot, done! Obviously PowerShell also support renaming a domain controller.

Because of that, that is what I thought and actually did.

Figure 1: Renaming The Domain Controller

Confirmation it t is renamed after the reboot of the Domain Controller.

Figure 2: Confirmation The Rename Of The Domain Controller Is Effective After The Reboot

However, after trying to log in I see the following error, which was not expected. For sure it had to do with the rename of the Domain Controller. Checking with ADUC on other Domain Controllers, I noticed the computer was not renamed as it still had the old name.

Figure 3: Error During Console log On After Renaming The Domain Controller Through The GUI

I needed to fix this to be able to get in (i.e., log on) and try the command line option. So, from another Domain Controller I connected remotely to the registry of the affected Domain Controller and changed some values to the original name (R1FSRWDC2) as you can see below in figure 4a, figure 4b and figure 4c.

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
> Hostname
> NV Hostname
Figure 4a: Changing The Name Back In The TCP/IP Parameters Section

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ActiveComputerName
> ComputerName
Figure 4b: Changing The Name Back In The ActiveComputerName Section

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ComputerName\ComputerName
> ComputerName
Figure 4c: Changing The Name Back In The ComputerName Section

After these changes, I rebooted the DC, and was then able to log in again! Yeah!

Then I wanted to renamed the domain controller through PowerShell and reboot the Domain Controller

Rename-Computer -NewName R1FSRWDC3 -Restart
Figure 5: Renaming The Domain Controller Through PowerShell

The Domain Controller was renamed, rebooted and after that I could log in as expected. Opening ADUC, I could see the computer account name was also renamed (R1FSRWDC3). DONE!

Figure 6: The Renamed Computer Account Of The Domain Controller In ADUC

Lesson learned? – Use PowerShell on the Domain Controller you need to rename!

Cheers,

Jorge

————————————————————————————————————————————————————-
This posting is provided “AS IS” with no warranties and confers no rights!
Always evaluate/test everything yourself first before using/implementing this in production!
This is today’s opinion/technology, it might be different tomorrow and will definitely be different in 10 years!
DISCLAIMER: https://jorgequestforknowledge.wordpress.com/disclaimer/

————————————————————————————————————————————————————-
########################### IAMTEC | Jorge’s Quest For Knowledge ##########################
#################### https://jorgequestforknowledge.wordpress.com/ ###################

————————————————————————————————————————————————————

IAMTEC

Identity | Security | Recovery

————————————————————————————————————————————————————-

Posted in Active Directory Domain Services (ADDS), PowerShell, Rename, Windows Server | Tagged: , , | Leave a Comment »

(2025-11-14) 32K Pages Size vs 8K Pages Size On W2K25 DCs – That Could Be A Problem!

Posted by Jorge on 2025-11-14


Just wanted to check this out myself, see what happens and add some more info. All credit is for Christoffer Andersson for discovering this issue and reporting it to MSFT.

Now when you look at the documentation from Microsoft in What’s new in Windows Server 2025 For Active Directory Domain Services, you will see the following line of text (and also in Figure 1):

An upgraded DC continues to use its current database format and 8k pages. Moving to a 32k-page database is done on a forestwide basis and requires that all DCs in the forest have a 32k-page capable database.

Figure 1: Information From Microsoft About The 32K Database Page Size Optional Feature

Although being mentioned what happens during an in-place upgrade, it unfortunately does not explicitly mention what the real impact is. You have to read between the lines. This one remembered me again from many years ago why I hate upgrades. Crap in, crap out. Always clean installs!

When having at least 1 DC in the AD Forest with 8K Database Page Size, you CANNOT enable the feature! All DCs with either an empty value (non-W2K25 DC) or the value 8192 (Upgraded W2K25 DC) for the attribute “msDS-JETDBPageSize” on the NTDS Settings object, must either be removed from the AD forest or be replaced by a W2K25 DC that has been added to the AD forest through promotion. However, when using an IFM set to source the promotion, the DC where that IFM set was created MUST already have the 32K Database Page Size enabled for its own database!

To try this out, I used one of my AD Forest with fresh promoted W2K25 RWDCs/RODCs and 1 fresh promoted W2K22 RWDC. I cloned that W2K22 RWDC and isolated it in a separated VLAN. I seized all FSMO roles and cleaned the AD metadata of the other RWDCs/RODCs. The end result was 1 W2K22 RWDC in the AD forest. Good enough for this exercise. Just to be sure: in production always have AT LEAST 2 RWDCs per AD domain!

After all that, I in-place upgraded the W2K22 RWDC to a W2K25 RWDC. Before the upgrade the value for the attribute “msDS-JETDBPageSize” on the NTDS Settings object was empty. After the upgrade, the attribute “msDS-JETDBPageSize” on the NTDS Settings object had the value 8192 (i.e., 8K), see Figure 2.

Figure 2: The Value Of The Attribute “msDS-JETDBPageSize” on the NTDS Settings object

Because the AD forest was upgraded some time ago from W2K22 DCs with DFL/FFL W2K16, I first needed to increase the DFL/FFL to W2K25. By upgrading the FFL, the DFL also came along to W2K25. This went without issues as there was only 1 RWDC and it was running W2K25, see figure 3.

Figure 3: Upgrading The Forest Functional Level From W2K16 To W2K25

As a starting point, lets have a look at the available optional features in the AD forest (figure 4).

Get-ADOptionalFeature -Filter * | Select Name,FeatureGUID,RequiredForestMode,FeatureScope,EnabledScopes
Figure 4: The Available Optional Features In The AD Forest

Now let’s enable the Optional Feature “Database 32k Pages Feature”.

Enable-ADOptionalFeature -Identity 52982ac6-1e73-754f-ae24-73ae2775aab8 -Scope ForestOrConfigurationSet -Target IAMTEC.NET
Figure 5: Trying To Enable Optional Feature “Database 32k Pages Feature”

Enable-ADOptionalFeature : The Active Directory JET database page size does not match on all Domain Controllers in this forest
At line:1 char:1

  • Enable-ADOptionalFeature -Identity 52982ac6-1e73-754f-ae24-73ae2775aa …
  • ~~~~~~~~~~~~~~~~~
    • CategoryInfo : NotSpecified: (52982ac6-1e73-754f-ae24-73ae2775aab8:ADOptionalFeature) [Enable-ADOptionalFeature], ADException
    • FullyQualifiedErrorId : ActiveDirectoryServer:8660,Microsoft.ActiveDirectory.Management.Commands.EnableADOptioalFeature

As expected that failed with an error, which means that least 1 DC does NOT HAVE 32K Database Page Size. In the Directory Services Event Log you will see the following error (figure 6).

Figure 6: Error In The Directory Services Event Log When Trying To Enable Optional Feature “Database 32k Pages Feature”

Now, let’s have a look at the database info from the NTDS.DIT after the OS upgrade and before the offline defrag of the database. Note the version and the page size (figure 7).

ESENTUTL /m D:\AD\DB\NTDS.DIT
Figure 7: Detailed Info From The NTDS.DIT Of The RWDC BEFORE The Offline Defrag

Now, let’s have a look at the database info from the NTDS.DIT that is used initially during every promotion over the wire. Again, note the version and the page size (figure 8).

ESENTUTL /m C:\WINDOWS\SYSTEM32\NTDS.DIT
Figure 8: Detailed Info From The NTDS.DIT That Is Used For Promotions Over The Wire

Now let’s try to offline defrag the NTDS.DIT after the OS upgrade (figure 9).

StopService NTDS -Force
NTDSUTIL "AC IN NTDS" FILES "COMPACT TO D:\TEMP"
Figure 9: Performing An Offline Defrag On The NTDS.DIT After The UPGRADE To W2K25

Now, let’s have a look at the database info from the NTDS.DIT after the OS upgrade and after the offline defrag of the database. Note the version and the page size (figure 10) and compare with what you see in figure 7.

ESENTUTL /m D:\TEMP\NTDS.DIT
Figure 10: Detailed Info From The NTDS.DIT Of The RWDC AFTER The Offline Defrag

Now the old logs need to be deleted and the defragged NTDS.DIT needs to replace the original NTDS.DIT. After that the NTDS Service can be started again, or at least try to start.

Figure 11: The NTDS Service Fails To Start

Looking for more info in the Directory Services Event Log you will see something similar to what you see in figure 12a, figure 12b, figure 12c and figure 12d.

Figure 12a: More Info Related To The NTDS Service Failing To Start
Figure 12b: More Info Related To The NTDS Service Failing To Start
Figure 12c: More Info Related To The NTDS Service Failing To Start
Figure 12d: More Info Related To The NTDS Service Failing To Start

Now let’s try to reboot the upgraded the W2K25 DC after having defragged its NTDS.DIT, and see what happens.

Figure 13: After Rebooting The DC – AD Fails To Start

HOUSTON? We HAVE A SERIOUS PROBLEM!

The DC is now dead in the water!

Lesson learned? – I still hate in place upgrades!

For others, the recommendation is:

  • DO NOT in place upgraded your DC to W2K25!
  • DO NOT promote DCs through IFM, where the IFM Set was created on an upgraded W2K25 DC!
  • DO promote over the wire
  • DO promote DCs through IFM, where the IFM Set was created on a non-upgraded (i.e., promoted) W2K25 DC!

Cheers,

Jorge

————————————————————————————————————————————————————-
This posting is provided “AS IS” with no warranties and confers no rights!
Always evaluate/test everything yourself first before using/implementing this in production!
This is today’s opinion/technology, it might be different tomorrow and will definitely be different in 10 years!
DISCLAIMER: https://jorgequestforknowledge.wordpress.com/disclaimer/

————————————————————————————————————————————————————-
########################### IAMTEC | Jorge’s Quest For Knowledge ##########################
#################### https://jorgequestforknowledge.wordpress.com/ ###################

————————————————————————————————————————————————————

IAMTEC

Identity | Security | Recovery

————————————————————————————————————————————————————-

Posted in Active Directory Domain Services (ADDS), In Place Upgrade, Install From Media, NTDS.DIT, Optional Features | Tagged: , , , , , | Leave a Comment »

(2025-11-12) Soft-Delete For Groups In Entra ID

Posted by Jorge on 2025-11-12


Previously in Entra ID, only Applications, Users, M365 Groups supported soft delete. Recently Microsoft has extended the list to now also include Cloud Security Groups as you can see below in figure 1.

SOURCE: https://learn.microsoft.com/en-us/entra/architecture/recover-from-deletions

Figure 1: List Of Objects In Entra ID Supporting Soft Delete

When looking at “Users”, it both means native users in Entra ID and users synched from on-premises AD to Entra ID. So far so good. When looking at “Cloud Security Groups”, and you read too quickly without thinking about it, you might interpreter it as it means means both native groups in Entra ID and groups synched from on-premises AD to Entra ID. Au contraire! The word Cloud Security Group literaly gives it away. The soft deletion is really only for native security groups in Entra ID! Soft deletion for groups synched from on-premises AD to Entra ID is unfortunately still not possible, ;-( Bummer! I truly would have hoped it was also included.

Have a look at figure 2 below. You will see 3 groups:

  • “__CLOUD_NATIVE_GROUP” – being the so called Cloud Security Group created and managed in Entra ID
  • “__HYBRID_CLOUD_SYNC_GROUP” – being the group synched from on-premises AD through Cloud Sync
  • “__HYBRID_CONNECT_SYNC_GROUP” – being the group synched from on-premises AD through Connect Sync
Figure 2: List Of Groups In Entra ID

To test soft deletion support for all 3 groups, I did the following:

  • “__CLOUD_NATIVE_GROUP” – Deleted in Entra ID manually
  • “__HYBRID_CLOUD_SYNC_GROUP” – removed from the scope of sync configured for Cloud Sync
  • “__HYBRID_CONNECT_SYNC_GROUP” – removed from the scope of sync configured for Connect Sync

In all 3 cases the groups will be deleted from Entra ID. The question is, which one(s) end up in the Recycle Bin for groups in Entra ID (i.e., supporting soft deletion). You can see the answer in figure 3, which unfortunately is only the Cloud Security Group “__CLOUD_NATIVE_GROUP”. That one is soft deleted. The other 2, “__HYBRID_CLOUD_SYNC_GROUP” and “__HYBRID_CONNECT_SYNC_GROUP” are hard deleted as those are not visible in the Recycle Bin for groups in Entra ID.

Figure 3: Recycle Bin For Groups

To further prove this group “__CLOUD_NATIVE_GROUP” was manually undeleted, i.e., restored, and the 2 groups “__HYBRID_CLOUD_SYNC_GROUP” and “__HYBRID_CONNECT_SYNC_GROUP” were brought back into the scope of sync of their respective sync engines. The end result is displayed in figure 4.

Figure 4: List Of Groups In Entra ID

When you pay close attention looking at figure 4, you can see the object id of the group “__CLOUD_NATIVE_GROUP” is the same as the object id of the same group displayed in figure 2. For the groups “__HYBRID_CLOUD_SYNC_GROUP” and “__HYBRID_CONNECT_SYNC_GROUP” in figure 4 you will be able to see both have a new object id which means those have been recreated by the respective sync engine.

Conclusion is still therefore to be careful with groups synched from on-premises AD. A small mistake, or even a Forest Recovery of AD without performing a GAP analysis will result in hard-deleted objects in Entra ID that cannot be recovered without impact.

Cheers,

Jorge

————————————————————————————————————————————————————-
This posting is provided “AS IS” with no warranties and confers no rights!
Always evaluate/test everything yourself first before using/implementing this in production!
This is today’s opinion/technology, it might be different tomorrow and will definitely be different in 10 years!
DISCLAIMER: https://jorgequestforknowledge.wordpress.com/disclaimer/

————————————————————————————————————————————————————-
########################### IAMTEC | Jorge’s Quest For Knowledge ##########################
#################### https://jorgequestforknowledge.wordpress.com/ ###################

————————————————————————————————————————————————————

IAMTEC

Identity | Security | Recovery

————————————————————————————————————————————————————-

Posted in Azure AD Cloud Sync, Azure AD Connect, Groups, Soft Delete, Windows Azure Active Directory | Tagged: , , , | Leave a Comment »

(2025-11-08) TODAY Marks 20 YEARS Of Blogging

Posted by Jorge on 2025-11-08


Today, exactly 20 years ago I started blogging and created my “Jorge’s Quest For Knowledge” blog, which has been and still is being read by many people around the world. My biggest drive and passion to do this is to research and acquire knowledge, and then share it with others around the globe so that those people can use the information to their best usage in their day-to-day jobs. The very first post was on Tuesday November 8th 2005.

It has been so much fun to do this, and I hope it remains fun to continue to do this for the next ten years!

A very big THANK YOU to all my readers/visitors

Cheers,

Jorge

————————————————————————————————————————————————————-
This posting is provided “AS IS” with no warranties and confers no rights!
Always evaluate/test everything yourself first before using/implementing this in production!
This is today’s opinion/technology, it might be different tomorrow and will definitely be different in 10 years!
DISCLAIMER: https://jorgequestforknowledge.wordpress.com/disclaimer/

————————————————————————————————————————————————————-
########################### IAMTEC | Jorge’s Quest For Knowledge ##########################
#################### https://jorgequestforknowledge.wordpress.com/ ###################

————————————————————————————————————————————————————

IAMTEC

Identity | Security | Recovery

————————————————————————————————————————————————————-

Posted in Blog | Tagged: , | Leave a Comment »

 
Design a site like this with WordPress.com
Get started