I have a particular situation in some pc's in our domain. Sometimes, When I tries to connect to a remote pc using any of the domain user accounts, I gets the "Access denied" exception. The following is the query which I have tried...
$secpasswd = ConvertTo-SecureString "password" -AsPlainText -Force
$mycreds = New-object -typename System.Management.Automation.PSCredential("domain\username1",$secpasswd)
Enter-pssession 92.168.30.52 –credential $mycreds
At the same time, If I tries the same thing with a different account from the same domain(the account of user, who is regularly using that pc), the connection succeeds.
Sometimes there is no such issue(I could connect using any of the domain accounts). I am not sure why this inconsistent behavior happens(This happens for many pc'ss in the domain). If anyone can shed some light in to this issue, that would be greatly appreciated
Thanks & regards
Sebastian