title: Runspace broke. (Remoting, WinRM, and Sharepoint )
body: <p>So first, the following worked fine 3 days ago against the same sharepoint server, works fine against other sharepoint servers in the farm, and after I did something I’ll elaborate on later works fine again.</p>
  
  <p>But for 3 days, I could constantly break my runspace by doing the following</p>
  
  <pre>$sess = new-pssession –computername $comp –Credential $cred –Authentication CredSSP</pre>
  
  <p>so far so good</p>
  
  <pre>Enter-PSSession $sess</pre>
  
  <p>so far so good</p>
  
  <pre>Add-PSSnapin Microsoft.SharePoint.PowerShell</pre>
  
  <p>Still good</p>
  
  <p>I can do 0 or more different Sharepoint gets, like <code>Get-SPServer</code></p>
  
  <p>But then when I do:</p>
  
  <pre>Get-SPServiceApplication</pre>
  
  <p>I get:</p>
  
  <blockquote>
    <p>Processing data for a remote command
    failed with the following error
    message: The WSMan provider host
    process did not return a proper
    response. A provider in the host
    process may have behaved improperly.
    For more information, see the about
    _Remote_Troubleshooting Help topic.</p>
  </blockquote>
  
  <p>The session kicks back to my main session, and the runspace is broken.</p>
  
  <p>This was consistent, and I’m not sure why. I can run it fine against other servers in the farm, and could run it against this server up until a few days ago</p>
  
  <p>Whats interesting is what "FIXED" it.</p>
  
  <p>So I figured to investigate further I could Terminal Services into the actual machine and run it locally. I did that and it ran locally without error, then AFTER that it ran normally through remoting as well.</p>
  
  <p>Does anybody have a clue what is going on?</p>