WinRM is not working between domain and workgroup

Welcome Forums General PowerShell Q&A WinRM is not working between domain and workgroup

This topic contains 1 reply, has 2 voices, and was last updated by

11 months, 2 weeks ago.

  • Author
  • #95278

    Points: 0
    Rank: Member


    I'm new to powershell and trying to manage a few workstations (Win7 & Win10) in a workgroup from my computer (part of a domain, Win10). Unfortunately I'm not successful.

    The following I'm trying:

    Enable-PSRemoting -force
    $RemoteComputer = "RemoteWS01"
    $LocalComputer = "MyPC01.domain.local"
    Set-Item wsman:\localhost\Client\TrustedHosts -value $LocalComputer
    Set-Item wsman:\localhost\Client\TrustedHosts -value $RemoteComputer
    $User = "Administrator" // remote account on WS, that's not me
    $Passwd = ConvertTo-SecureString "BestPWever" -AsPlainText -Force
    $Cred = New-Object System.Management.Automation.PSCredential ($User, $Passwd)
    $Sess = New-PSSession -Computer $RemoteComputer -Credentials $Cred -Authentication Negotiate
    Invoke-Command -Session $Sess -ScriptBlock { ping localhost }

    The "New-PSSession" line fails, but I don't know why. What do I have to take care about, when connecting from a domain to a workgroup? WinRM service is running on RemoteWS01 and firewall is completely turned off with network profile set to "private". Any ideas?

    Best regards

  • #95280

    Points: 1,811
    Helping HandTeam Member
    Rank: Community Hero

    Negotiate won't work, you'll need basic and HTTPS endpoints. Check out "Secrets of PowerShell Remoting" on our eBooks menu, I covered this exact scenario.

The topic ‘WinRM is not working between domain and workgroup’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort