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