Unable to connect to Hyper-V 2019 Type 1 server using Hyper-V Manager Computer policy does not allow the delegation of the user credentials to the target computer

Murugan Andezuthu Dharmaratnam 116 Reputation points
2023-05-24T16:57:45.08+00:00

Unable to connect to Hyper-V 2019 Type 1 server using Hyper-V Manager Computer policy does not allow the delegation of the user credentials to the target computer

The operation on computer 'CONTAINER' failed: The WinRM client cannot process the request. A computer policy does not allow the delegation of the user credentials to the target computer because the computer is not trusted.

       Message = WinRM firewall exception will not work since one of the network connection types on this machine is set to Public. Change the network connection type to either Domain or Private and try again.

Might be this is the issue . But I have tried everything.

These are some of the things I have done on server and client

SERVER

Already ran the below commands on the server

Enable-PSRemoting
Enable-WSManCredSSP -Role server

And
Status from server 

Get-Service WinRM
Running  WinRM              Windows Remote Management (WS-Manag...

Get-NetFirewallRule -DisplayName "Windows Remote Management (HTTP-In)"
Enabled               : True

winrm enumerate winrm/config/listener

    Address = *
    Transport = HTTP
    Port = 5985
    Hostname
    Enabled = true
    URLPrefix = wsman
    CertificateThumbprint
    ListeningOn = 127.0.0.1, 192.168.1.8, ::1, 2401:4900:1f26:64bc:3175:b792:61ed:779f, fe80::3175:b792:61ed:779f%4

winrm get winrm/config/service/Auth

Auth
    Basic = false
    Kerberos = true
    Negotiate = true
    Certificate = false
    CredSSP = true
    CbtHardeningLevel = Relaxed


CLIENT 



Enable-PSRemoting
WinRM is already set up to receive requests on this computer.

Set-Item WSMan:\localhost\Client\TrustedHosts -Value CONTAINER  
 
Enable-WSManCredSSP -Role client -DelegateComputer CONTAINER
cfg         : http://schemas.microsoft.com/wbem/wsman/1/config/client/auth
lang        : en-US
Basic       : true
Digest      : true
Kerberos    : true
Negotiate   : true
Certificate : true
CredSSP     : true

Enable-WindowsOptionalFeature -Online -FeatureName:Microsoft-Hyper-V -All
Path          :
Online        : True
RestartNeeded : False

Set-NetConnectionProfile -InterfaceAlias "Wi-Fi" -NetworkCategory Private


cmdkey /add:CONTAINER /user:CONTAINER\Administrator /pass Murugan@123

CMDKEY: Credential added successfully.


Get-NetConnectionProfile
Name                     : Airtel_9482870788_5GHz
InterfaceAlias           : Wi-Fi
InterfaceIndex           : 17
NetworkCategory          : Private
DomainAuthenticationKind : None
IPv4Connectivity         : Internet
IPv6Connectivity         : Internet

Set-NetFirewallRule -DisplayName "Windows Remote Management (HTTP-In)" -Enabled True
Set-NetFirewallRule -DisplayName "Windows Remote Management (HTTP-In)" -LocalPort 5985

Set-NetConnectionProfile -InterfaceAlias  Wi-Fi -NetworkCategory Private
Set-NetConnectionProfile -InterfaceAlias  "Wi-Fi" -NetworkCategory Private

Restart-Service WinRM


Get-NetConnectionProfile | Where-Object {$_.InterfaceAlias -eq "Wi-Fi"} | Select-Object -ExpandProperty NetworkCategory
Private

Checked Yes : Network Location Awareness (NLA) service is running on your computer


Set-NetConnectionProfile -InterfaceAlias  Wi-Fi -NetworkCategory Private

disabled wifi 

Set-NetConnectionProfile -InterfaceAlias "Ethernet" -NetworkCategory Private
Can see nothing in Private


 winrm quickconfig
WinRM service is already running on this machine.
WSManFault
    Message
        ProviderFault
            WSManFault
                Message = WinRM firewall exception will not work since one of the network connection types on this machine is set to Public. Change the network connection type to either Domain or Private and try again.

Error number:  -2144108183 0x80338169
WinRM firewall exception will not work since one of the network connection types on this machine is set to Public. Change the network connection type to either Domain or Private and try again.
Hyper-V
Hyper-V
A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,546 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 43,951 Reputation points
    2023-05-25T12:43:26.23+00:00

    Hello there,

    You must run Hyper-V Manager using an account that is in the Administrators group or Hyper-V Administrators group on the HyperV Server. Otherwise, you will NEVER be able to connect to the Hyper-V host. If your management workstation’s administrator account does not have those capabilities, hold down [Shift] while right-clicking the Hyper-V Manager shortcut, and then choose Run as a different user.

    This article lists the supported combinations of Hyper-V hosts and Hyper-V Manager versions and describes how to connect to remote and local Hyper-V hosts so you can manage them.

    https://learn.microsoft.com/en-us/windows-server/virtualization/hyper-v/manage/remotely-manage-hyper-v-hosts

    Hope this resolves your Query !!

    --If the reply is helpful, please Upvote and Accept it as an answer--

    0 comments No comments