I am using Ansible PywinRm to connect and run powershell on the remote windows 2012 R2 server.
import winrm
s = winrm.Session('192.X.X.X',auth=('administrator@CORP.LOCAL', 'anything'), transport='kerberos')
r = s.run_cmd('ipconfig', ['/all']) --- works fine
r = s.run_ps("""New-Cluster -Name sqlaagcluster -Node firstcomputer.CORP.LOCAL,secondcomputer.CORP.LOCAL -StaticAddress 192.X.X.X""") --- access denied on the second computer
Please help.