Add-Computer –DomainName mylab.local –Credential (Get-Credential)
From the above code sample, you can see that the mylab.lcal domain is being added to the Windows 10 computer. We also use the Credential parameter to specify the account that has the right to add computers to the domain. This requires a PSCredential object. To build this object, you can use the Get-Credential command in parentheses. This tells PowerShell to run this command before running Add-Computer.
Step 4: When this command runs, restart the computer and the process is complete.
Adding a domain on Windows 10 is very simple. As you can see, depending on the context, there are several different ways to make domain joins. Be sure to choose the easiest and most convenient method for you.
See more: