Hello again (yes it’s been awhile sense my last post).
Working on a script for work I came across an interesting behavior of WinRM. When I attempt to connect to a domain controller of a non-trusted domain and I use a samAccountname [domain\username] I get the following (and typical) error:
The $sam cred looks like:
…BUT if I use UPN the Invoke-Command works:
The $upn looks like:
The client computer is a member of a domain but not the “thenewtonlab.com” domain…I’ve tested this from a workgroup computer and it fails…
Next time your having WinRM issues give this a try…let me know how it goes. I’d love to hear if it works for you as well.
Happy scripting,
D
EDIT:
So after doing some further testing geeking, I’ve found that using the UPN works around the configuration needed for CredSSP to connect to SharePoint (as listed here).
AND…this works for a WORKGROUP computer if you run:
Set-Item WSMan:\localhost\Client\TrustedHosts -Value “*” -Force (from an elevated shell)
This has been a great find for me. Now it’s beer:30 🙂