I am currently trying to add a Windows Server 2016 Vm to our domain using the following command.
Add-Computer -ComputerName $ServerName -NewName $ServerName -LocalCredential $localCreds -Credential $adcreds -DomainName mydomain.net -OUPath $ou -Force
The command creates the AD computer object and renames the server pending its reboot.
However, the cmdlet runs for about 15 minutes then gives us the following error:
Add-Computer : Cannot establish the WMI connection to the computer 'SERVER' with the following error message: The remote procedure call failed. (Exception from HRESULT: 0x800706BE).
We are not experiencing this issue at all with our Windows Server 2012 R2 Build.
Looks like failed authentication. You can try to connect to the remote computer by the following code example:
Net use \$servername\IPC$ /User:Administrator $LocalCreds.GetNetworkcredential().password
After that, try your command again.
User contributions licensed under CC BY-SA 3.0