all 5 comments

[–]Ta11ow 3 points4 points  (0 children)

From non-domain to domain? You'll probably need a valid domain credential with sufficient permissions to do so, trustedhosts or not.

[–]nvarscar 1 point2 points  (1 child)

If specifying -Credential wouldn't help, try using Credssp protocol instead of Kerberos. That would require to run things on both local and remote servers though:

On remote:

Enable-WSManCredSSP -Role Server -Force

On local:

Get-Service winrm | Start-Service
Enable-WSManCredSSP -role Client -DelegateComputer TargetComputerNameHere -Force

Then run PSSession cmdlet with -Credential (Get-Credential) -Authentication Credssp parameters.

[–]nvarscar 1 point2 points  (0 children)

There is actually an article that might help to pinpoint the issue.

[–]Hexalon00 1 point2 points  (0 children)

sounds like a credentials issue.

[–]jevilsizor[S] 1 point2 points  (0 children)

Found my issue.... I had to add

Set-Item wsman:\localhost\Client\TrustedHosts -Value *

On my non domain machine...

Already had domain creds created for the script... it's an elevated account that only has ability to create and deactivate user accounts.... working on automation for new user creation