I've been breaking my head over this error. When I try to start a new CIMSession, it says it cannot find the computer. Ive verified that both computers are on the same network and that they both can talk to each other. I can ping both PCs from each other and i can access the shared folders as well. I can ping using both IP and NetBIOS name. I have added both PCs to the trusted hosts on Group Policy and have allowed it on the firewall. What am i missing or what am i doing wrong?
PS C:\Windows\system32> $session=New-CimSession -ComputerName DESKTOP-FJMTUOQ
New-CimSession : WinRM cannot complete the operation. Verify that the specified computer name is valid, that the computer is accessible over the network, and that a
firewall exception for the WinRM service is enabled and allows access from this computer. By default, the WinRM firewall exception for public profiles limits access to
remote computers within the same local subnet.
At line:1 char:10
+ $session=New-CimSession -ComputerName DESKTOP-FJMTUOQ
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ConnectionError: (:) [New-CimSession], CimException
+ FullyQualifiedErrorId : HRESULT 0x80338126,Microsoft.Management.Infrastructure.CimCmdlets.NewCimSessionCommand
+ PSComputerName : DESKTOP-FJMTUOQ
EDIT
When running Test-NetConnection -ComputerName DESKTOP-FJMTUOQ -CommonTCPPort WINRM
, I get the following results
PS C:\Windows\system32> Test-NetConnection -ComputerName DESKTOP-FJMTUOQ -CommonTCPPort WINRM
WARNING: TCP connect to DESKTOP-FJMTUOQ:5985 failed
ComputerName : DESKTOP-FJMTUOQ
RemoteAddress : 10.0.2.15
RemotePort : 5985
InterfaceAlias : Ethernet
SourceAddress : 10.0.2.254
PingSucceeded : True
PingReplyDetails (RTT) : 0 ms
TcpTestSucceeded : False
EDIT - Same test but backwards (from DESKTOP-FJMTUOQ to WIN-R9HLL0ILD3)
PS C:\Users\freyes.FRANK> Test-NetConnection -ComputerName WIN-R9HLL0ILD37 -CommonTCPPort WINRM ComputerName : WIN-R9HLL0ILD37
RemoteAddress : 10.0.2.254
RemotePort : 5985
InterfaceAlias : Ethernet
SourceAddress : 10.0.2.15
TcpTestSucceeded : True