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

Welcome Forums General PowerShell Q&A 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

 
Participant
4 years, 4 months ago.

  • Author
    Posts
  • #16149

    Participant
    Points: 0
    Rank: Member

    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

    Keymaster
    Points: 1
    Rank: Member

    That usually means mutual authentication couldn't work.

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

  • #16158

    Participant
    Points: 0
    Rank: Member

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

  • #16160

    Keymaster
    Points: 1
    Rank: Member

    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

    Participant
    Points: 0
    Rank: Member

    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

The topic ‘Get-CimInstance works from S1 to S2 but not from S2 to S1’ is closed to new replies.