0

I set up a lab to test domain joining multiple computers with a script from Microsoft.

After I ran the script it came back with could not establish a WMI connection with the computer with the following error message:access is denied.

There are two workgroup computers, I input their name, their credentials. The command running on one device is:

Add-Computer -ComputerName SWC2-PC -LocalCredential SWC2-PC\[email protected] -DomainName swc.local -Credential swc.local\Administrator -Restart -Force

When the script is run FROM the DC that runs the domain I am trying to get the workgroup computers on and I continuously get that error.

1 Answer 1

2

Your -localcredential doesn't look right. It should be an administrator credential for the workgroup computer, e.g. SWC2-PC\Administrator.

Your [email protected] looks like a domain UPN, and that's not going to work on your non-domain-joined computer. To see if you can connect with the credential, test it with Enter-PSSession:

Enter-PSSession -ComputerName SWC2-PC -Credential SWC2-PC\Administrator

Just on general principle, use NETBIOS domain names when troubleshooting. e.g. SWC\Administrator (assuming your domain NETBIOS name is "SWC"). Sometimes it "just works" when the FQDN format does not.

Finally, using .local is deprecated for AD domain names. Even in a lab, just don't do it - use a subdomain of a domain you have registered or what it will be called in actuality. It's better to avoid getting into bad habits, even in the lab.

For example, by default Windows Server 2016 Essentials adds .local to the computer name of a fresh installation (bad design by MS). You should get used to checking and fixing your domain FQDN during install rather than clicking through the defaults. (The Powershell method for installing a domain is easier and more consistent.)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .