Are you facing discover issue with multiple devices or specific device: Multiple Devices
Which version of Windows facing registration issue: Windows 10 1909 and newer
Can you confirm, do you have Single forest AD or multi-forest environment: Single forest AD
When I run this in PS, nothing comes up, just goes to the command prompt. Changed the DC to our information, which was verified correct with the get-adrootdse command.
$scp = New-Object System.DirectoryServices.DirectoryEntry;
$scp.Path = "LDAP://CN=62a0ff2e-97b9-4513-943f-0d221bd30080,CN=Device Registration Configuration,CN=Services,CN=Configuration,DC=fabrikam,DC=com";
$scp.Keywords;
Farther down with this, there isn't a AdPrep folder on my system.
Import-Module -Name "C:\Program Files\Microsoft Azure Active Directory Connect\AdPrep\AdSyncPrep.psm1";
$aadAdminCred = Get-Credential;
Initialize-ADSyncDomainJoinedComputerSync –AdConnectorAccount [connector account name] -AzureADCredentials $aadAdminCred;
One thing I have wondered is an issue, is that our domain is not .com, but .local, and if that could cause an issue.
For the PSExec command, I had to go to https://learn.microsoft.com/en-us/sysinternals/downloads/psexec and then download, extract, and then go to its location in command prompt, then the command you posted ran.
It looks like it worked.
https://enterpriseregistration.windows.net/EnrollmentServer/DeviceEnrollmentWebService.svcurn:ms-drs:enterpriseregistration.windows.net1.0https://login.microsoftonline.com/16434642-8eaf-485f-a032-99937cbe0a74/oauth2/authorizehttps://login.microsoftonline.com/16434642-8eaf-485f-a032-99937cbe0a74/oauth2/tokenhttps://login.microsoftonline.com/ulsonline.net/wsfedhttps://enterpriseregistration.windows.net/EnrollmentServer/device/urn:ms-drs:enterpriseregistration.windows.net1.0https://login.microsoftonline.com/https://device.login.microsoftonline.com/https://enterpriseregistration.windows.net/https://enterpriseregistration.windows.net/EnrollmentServer/key/urn:ms-drs:enterpriseregistration.windows.net1.0
Running the PS script under https://learn.microsoft.com/samples/azure-samples/testdeviceregconnectivity/testdeviceregconnectivity/ was successful.
Running the DSRegTool and got the following:
Test 1 was successful
Test 2 was successful
Test 3 (Hybrid AD Join) failed in two areas:
Testing if connected to AzureAD - device is NOT connected to Azure AD
Testing Tenant ID - Tenant ID is not configured correctly, and gave the same registry location as in test 4.
Test 4 (verify SCP) Failed: Says the Tenant ID is not configured correctly and to make sure it is configured correctly in the registry.
Test 5 (verify health of device) failed with the same device is NOT connected to Azure AD, though it offers to go through the procedure of adding it by running dsregcmd /join, then run test 3.
Test 6 (verify PRT) passed for the PRT registry value
Ran the dsregcmd /join, and then tried test 3 again, and it still fails saying it isn't joined, and not happy with a registry entry.
Something changed at some point though, because when I run dsregcmd /status. The diagnostic data has changed to:
Error Phase - Pre-Check
Client ErrorCode - 0x1
It has a line of site to the domain, because I can login, and access network shared locations.