Get-CimInstance works from S1 to S2 but not from S2 to S1

This topic contains 4 replies, has 2 voices, and was last updated by Profile photo of Rich Beckett Rich Beckett 3 years ago.

  • Author
    Posts
  • #16149
    Profile photo of Rich Beckett
    Rich Beckett
    Participant

    I am doing a simple command Get-CimInstance -ClassName Win32_OperatingSystem – ComputerNema S2 from S1 which is a Windows 2012 R2 server running PowerShell 4.0 It fails with an error message tellingme that it failed with a Kerboros error.

    When I do the same command from S2 to S1, Get-CimInstance -ClassName Win32_OperatingSystem -ComputerName S1 itworks. I am running as Administrator and have PS Remoting enabled on both servers.

  • #16150
    Profile photo of Don Jones
    Don Jones
    Keymaster

    That usually means mutual authentication couldn't work.

    Are you able to Enter-PSSession from the one to the other?

  • #16158
    Profile photo of Rich Beckett
    Rich Beckett
    Participant

    Yes, I had already tried that. What I do not see is any way to pass credentials using the Get-CimInstance cmdlet.

  • #16160
    Profile photo of Don Jones
    Don Jones
    Keymaster

    You create a CimSession, and then pass that to the Get-CimInstance cmdlet. When you set up the session first, you get more options.

  • #16176
    Profile photo of Rich Beckett
    Rich Beckett
    Participant

    That worked fine. I thought maybe it was related to my running Powershell 5.0 CTP but after bringing up a fresh machine and still experiencing the same problem it was apparent that something else is going on. I am still at a lost to explain why it worked on from my 2008 R2 machine to my 2012 R2 .machine but not the other way.

    Thanks Don

You must be logged in to reply to this topic.