0

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

Error

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
frankjstrike
  • 5
  • 1
  • 3
  • Are you able to connect using PoweShell remoting? The CIM cmdlets use the same underlying protocol (WS-Man) to communicate, unlike the older WMI cmdlets which use DCOM. In either case being able to ping or browse shares doesn't guarantee connectivity. – boxdog Sep 30 '20 at 20:54
  • Run `Test-NetConnection -ComputerName DESKTOP-FJMTUOQ -CommonTCPPort WINRM` from the local computer and paste your results into the question body. – Andrew Ryan Davis Sep 30 '20 at 23:54
  • @AndrewRyanDavis I have put the results on the body. – frankjstrike Oct 01 '20 at 11:03
  • This is likely a network ACL problem. You're unable to connect on the port that WinRM uses. Are you able to confirm that network firewalls are open and not blocking this traffic? – Andrew Ryan Davis Oct 01 '20 at 17:00
  • Yes. I even tried turning off both firewalls (These are not production machines) and still get the same error. Weird enough, when i do it backwards (from DESTOP-FJMTUOQ to WIN-R9HLL0ILD37) the test goes through as you can see on the results i just added on the question body – frankjstrike Oct 01 '20 at 20:04
  • To me this really looks like an ACL blocking either inbound or outbound on one of those machines. Do you control the network in this environment? – Andrew Ryan Davis Oct 02 '20 at 01:07

0 Answers0