Hello together, I've had a customer with the same problem:
they deleted the "Managed Service Accounts" container from the ad and therefore were not able to install the intune connector.
Here's the way i got it working again:
- (opt) Delete manually created "Managed Service Accounts"-Container (I've had a similar container created with powershell, in this case, delete it)
- Connect to ADSI (Default Naming Context)
- Under "Default naming context -> DC=<DomainName>,DC=<TLD> -> CN=System -> CN=DomainUpdates -> CN=Operations" Delete Container called "CN=5e1574f6-55df-493e-a671-aaeffca6a100"
- Under "DC=<DomainName>,DC=<TLD> -> CN=System -> CN=DomainUpdates -> CN=ActiveDirectoryUpdate" edit Properties: revisions (set to 15/16), set to undefined / remove value
- Mount Server OS ISO
- Run ADprep.exe /domainprep (in my case: D:\support\adprep\adprep.exe /domainprep)
run the following PowerShell Script:
$DomainDN = (Get-ADDomain).distinguishedName
$TargetOWKOIDString = "1EB93889E40C45DF9F0C64D23BBB6237" # Identifier for wellknown SID.
$TargetOWKOTemplate = "B:32:$TargetOWKOIDString`:{0}" # String.Format replacable string.
$TargetDN = "CN=Managed Service Accounts,$DomainDN"
$OtherWellKnownObjectsOG = (Get-ADObject -filter "objectClass -eq 'domainDns'" -Properties otherwellknownobjects).otherwellknownobjects
$TargetOWKOIndex = $OtherWellKnownObjectsOG.IndexOf( $OtherWellKnownObjectsOG.where({ $PSItem -like "*$TargetOWKOIDString*"})[0])
Set-ADObject -Identity $DomainDN -Add @{ 'otherwellknownobjects' = ($TargetOWKOTemplate -f "$TargetDN") } -Remove @{ 'otherwellknownobjects' = $OtherWellKnownObjectsOG[$TargetOWKOIndex] }
(Get-ADObject -filter "objectClass -eq 'domainDns'" -Properties otherwellknownobjects).otherwellknownobjects
creds for script: Vin
What does it all do:
Recreates the Managed Service Accounts Container, so that you can add the default guid to the otherwellknownobjects.
This way the default state for the Managed Service Accounts Container is recreated and you can successfully install the intune connector.