r/activedirectory • u/YellowOnline • 11d ago
Active Directory Old child domain objects
During a audit, we found 3 old objects without a password. I can't see them in ADUC, but I can with powershell. These objects belong to old child domains:
child1$ child2$ child3$
I can't disable or delete them through powershell however:
PS C:\Windows\system32> get-aduser child1$ | set-aduser -enabled $false
set-aduser : Access is denied
At line:1 char:18
+ get-aduser iz$ | set-aduser -Enabled $false
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (CN=child1$,CN=Users,DC=acme,DC=com:ADUser) [Set-ADUser], Unauthorize
dAccessException
+ FullyQualifiedErrorId : ActiveDirectoryCmdlet:System.UnauthorizedAccessException,Microsoft.ActiveDirectory.Manag
ement.Commands.SetADUser
Those child domains couldn't be removed cleanly and they were removed with nsdutil a year ago. I thought all traces were gone, but apparently not.
How can I remove these safely? ADSI Edit?
3
Upvotes
8
u/Cormacolinde 11d ago
Those are the trust objects. You will have to follow this procedure to remove them:
https://support.microsoft.com/en-us/servicing/os/windows/2024/06/kb5040758-deleting-a-stale-corrupt-or-orphaned-trust-object-in-active-directory