This topic contains 2 replies, has 1 voice, and was last updated by
April 13, 2016 at 3:38 am #37638
I have a few AD users that are not able to enter a PSSession anywhere. The error is:
Enter-PSSession : Connecting to remote server localhost failed with the following error message : The WinRM client rece
ived an HTTP bad request status (400), but the remote service did not include any other information about the cause of
the failure. For more information, see the about_Remote_Troubleshooting Help topic.
At line:1 char:1
+ Enter-PSSession localhost
+ CategoryInfo : InvalidArgument: (localhost:String) [Enter-PSSession], PSRemotingTransportException
+ FullyQualifiedErrorId : CreateRemoteRunspaceFailed
If I run:
New-PSSession localhost -Credential $(Get-Credential)
with credentials of a user without the problem, the session is created. If I run the same command with credentials of the user with the issue, it generates the error – even thoug its on the same machine in the same console.
I have examined the AD user attributes and the groupmemberships and they are identical. I have chedked the userobject for spns but found none.
What should I try next?
April 13, 2016 at 3:52 am #37639
For uncertain reasons it works again.
April 13, 2016 at 4:51 am #37641
It turns out WINRM is sensitive to tokensize bloat. Someone removed the user with the issue from an AD group while I was testing and suddenly the issue disappeared. The funny thin was, that I had a shell running in the users context. In that shell I could not do:
but New-PSSession localhost -Credential $(Get-Credential)
worked just fine.
whoami /groups in in both sessions it became clear, that groups were removed.
The topic ‘New-PSSession localhost issue’ is closed to new replies.