Score:0

Could not establish WMI connection access is denied

ls flag

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.

Score:2
cn flag

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.)

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.