I am using Chef-server-11.04 and the chef-client 11.12.4-1 for windows server 2012 r2.I am trying to execute Active directory powershell cmds on the windows client. The recipe execution fails when I use
knife bootstrap windows winrm 10.XX.XXX.XX -x username -P xxxxxxx -r Adpowershell
or
*knife winrm "name:example.co.in" "chef-client -r Adpowershell " -x username -P xxxxxxx
The error is Unable to contact the server. This may be because this server does not exist, it is currently down, or it does not have the Active Directory Web Services running.
The knife command is successful for other powershell cmds other than Active directory powerwshell cmds
But the recipe executed successfully when I try it using chef-client locally on node.
I have refered various links regarding this unable to contact server. But could'nt find any solution for Windows 2012 r2 . Can anyone tell me a solution for this problem