This is first installation of Exchange 2019 CU12 in organization. setup with /PrepareSchema key passes fine. But on /PrepareAD I'v got this error.
[04/11/2023 15:49:06.0926] [2] The schema version identified for the Server is 17003
[04/11/2023 15:49:06.0926] [2] Leaving ScGetSchemaVersion
[04/11/2023 15:49:06.0926] [2] Leaving CDirectoryManager::ScSchemaIsUpToDate
[04/11/2023 15:49:06.0926] [2] Entering CDirectoryManager::ScGetCountOfOrgsInDomain
[04/11/2023 15:49:06.0926] [2] CDirectoryManager::ScGetCountOfOrgsInDomain (d:\dbs\sh\e19dt\0325_143417\cmd\b\sources\dev\admin\src\udog\setupbase\tools\dsmgr.cxx:495)
Error code 0X8007200A (8202): The specified directory service attribute or value does not exist.
[04/11/2023 15:49:06.0926] [2] Leaving CDirectoryManager::ScGetCountOfOrgsInDomain
[04/11/2023 15:49:06.0926] [2] CDirectoryManager::ScGetOrgLevelObjectStatus (d:\dbs\sh\e19dt\0325_143417\cmd\b\sources\dev\admin\src\udog\setupbase\tools\dsmgr.cxx:538)
Error code 0X8007200A (8202): The specified directory service attribute or value does not exist.
[04/11/2023 15:49:06.0926] [2] Leaving CDirectoryManager::ScGetOrgLevelObjectStatus
[04/11/2023 15:49:06.0926] [2] CDirectoryManager::ScReInitWithDC (d:\dbs\sh\e19dt\0325_143417\cmd\b\sources\dev\admin\src\udog\setupbase\tools\dsmgr.cxx:269)
Error code 0X8007200A (8202): The specified directory service attribute or value does not exist.
[04/11/2023 15:49:06.0926] [2] Leaving CDirectoryManager::ScReInitWithDC
[04/11/2023 15:49:06.0926] [2] ScInitializeManagedCodeContext (d:\dbs\sh\e19dt\0325_143417\cmd\1k\sources\dev\admin\src\udog\exsetdata\exsetds.cxx:380)
Error code 0X8007200A (8202): The specified directory service attribute or value does not exist.
[04/11/2023 15:49:06.0926] [2] ScSetupAtom (d:\dbs\sh\e19dt\0325_143417\cmd\1k\sources\dev\admin\src\udog\exsetdata\exsetds.cxx:877)
Error code 0X8007200A (8202): The specified directory service attribute or value does not exist.
[04/11/2023 15:49:06.0926] [2] Leaving ScSetupAtom
[04/11/2023 15:49:06.0926] [2] [ERROR] An error occurred with error code '2147950602' and message 'The specified directory service attribute or value does not exist.'.
[04/11/2023 15:49:06.0926] [2] [ERROR] An error occurred with error code '2147950602' and message 'The specified directory service attribute or value does not exist.'.
[04/11/2023 15:49:06.0973] [1] The following 1 error(s) occurred during task execution:
[04/11/2023 15:49:06.0973] [1] 0. ErrorRecord: An error occurred with error code '2147950602' and message 'The specified directory service attribute or value does not exist.'.
[04/11/2023 15:49:06.0973] [1] 0. ErrorRecord: Microsoft.Exchange.Management.Deployment.ExsetdataException: An error occurred with error code '2147950602' and message 'The specified directory service attribute or value does not exist.'.
at Microsoft.Exchange.Configuration.Tasks.Task.ThrowTerminatingError(Exception exception, ErrorCategory category, Object target)
at Microsoft.Exchange.Management.Deployment.ManageExsetdataAtom.HandleExsetdataReturnCode(UInt32 scErr)
at Microsoft.Exchange.Management.Deployment.ManageExsetdataAtom.InstallAtom(AtomID atomID)
at Microsoft.Exchange.Management.Deployment.InstallExsetdataAtom.InternalProcessRecord()
at Microsoft.Exchange.Configuration.Tasks.Task.<ProcessRecord>b__91_1()
at Microsoft.Exchange.Configuration.Tasks.Task.InvokeRetryableFunc(String funcName, Action func, Boolean terminatePipelineIfFailed)
[04/11/2023 15:49:06.0973] [1] [ERROR] The following error was generated when "$error.Clear();
install-ExsetDataAtom -AtomName OrgLevelCt -DomainController $RoleDomainController -Organization $RoleOrganizationName
" was run: "Microsoft.Exchange.Management.Deployment.ExsetdataException: An error occurred with error code '2147950602' and message 'The specified directory service attribute or value does not exist.'.
at Microsoft.Exchange.Configuration.Tasks.Task.ThrowTerminatingError(Exception exception, ErrorCategory category, Object target)
at Microsoft.Exchange.Management.Deployment.ManageExsetdataAtom.HandleExsetdataReturnCode(UInt32 scErr)
at Microsoft.Exchange.Management.Deployment.ManageExsetdataAtom.InstallAtom(AtomID atomID)
at Microsoft.Exchange.Management.Deployment.InstallExsetdataAtom.InternalProcessRecord()
at Microsoft.Exchange.Configuration.Tasks.Task.<ProcessRecord>b__91_1()
at Microsoft.Exchange.Configuration.Tasks.Task.InvokeRetryableFunc(String funcName, Action func, Boolean terminatePipelineIfFailed)".
[04/11/2023 15:49:06.0973] [1] [ERROR] An error occurred with error code '2147950602' and message 'The specified directory service attribute or value does not exist.'.
[04/11/2023 15:49:06.0973] [1] [ERROR-REFERENCE] Id=CommonGlobalConfig___a79d51e9e9424d53a462c1254e1ecece Component=EXCHANGE14:\Current\Release\Shared\Datacenter\Setup
[04/11/2023 15:49:06.0973] [1] Setup is stopping now because of one or more critical errors.
[04/11/2023 15:49:06.0973] [1] Finished executing component tasks.
[04/11/2023 15:49:06.0989] [1] Ending processing Install-ExchangeOrganization
[04/11/2023 15:49:06.0989] [0] CurrentResult console.ProcessRunInternal:198: 1
[04/11/2023 15:49:06.0989] [0] CurrentResult launcherbase.maincore:90: 1
[04/11/2023 15:49:06.0989] [0] CurrentResult console.startmain:52: 1
[04/11/2023 15:49:06.0989] [0] CurrentResult SetupLauncherHelper.loadassembly:452: 1
[04/11/2023 15:49:06.0989] [0] The Exchange Server setup operation didn't complete. More details can be found in ExchangeSetup.log located in the <SystemDrive>:\ExchangeSetupLogs folder.
[04/11/2023 15:49:06.0989] [0] CurrentResult main.run:235: 1
[04/11/2023 15:49:06.0989] [0] The registry key, HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ExchangeServer\V15\Setup, wasn't found.
[04/11/2023 15:49:06.0989] [0] CurrentResult setupbase.maincore:396: 1
[04/11/2023 15:49:06.0989] [0] End of Setup
[04/11/2023 15:49:06.0989] [0] **********************************************