title: PowerShell Access is denied. PSRemotingTransportException + FullyQualifiedErrorId : PSSessionStateBroken
body: <p>I was trying to establish a remote connection to another system and execute some basic commands.</p>
  
  <p>Below are the steps that I have done :</p>
  
  <ul>
  <li>Configured the remote machine to accept Shell commands - Enable-PSRemoting –
   Force</li>
  <li>Tested the configuration on remote machine - Test-WsMan COMPUTERNAME.</li>
  <li>Executed the following commands on the host machine :</li>
  </ul>
  
  <p>1.<code>Invoke-Command -ComputerName COMPUTERNAME -ScriptBlock {  Get-ChildItem C:\ } -credential USERNAME</code>.</p>
  
  <p>2.<code>Invoke-Command -ComputerName COMPUTERNAME -ScriptBlock {  Get-ChildItem C:\ } -credential $Credentials</code>.</p>
  
  <p>3.<code>Invoke-Command -ComputerName COMPUTERNAME -ScriptBlock {  Get-ChildItem C:\ }</code></p>
  
  <p>In all the cases, we were getting access denied error : </p>
  
  <pre><code>Access is denied. For more information, see the about_Remote_Troubleshooting Help topic. + CategoryInfo   : OpenError: (:) [], PSRemotingTransportException 
  + FullyQualifiedErrorId : PSSessionStateBroken
  </code></pre>