# Getting Access Denied while creating Cluster on Win2012 R2 using PywinRM

**URL:** <https://forum.ansible.com/t/getting-access-denied-while-creating-cluster-on-win2012-r2-using-pywinrm/23107>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [November 26, 2016, 6:10am UTC](https://forum.ansible.com/t/getting-access-denied-while-creating-cluster-on-win2012-r2-using-pywinrm/23107 "2016-11-26T06:10:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashish\_chanda](https://avatars.discourse-cdn.com/v4/letter/a/3ab097/32.png) [@ashish\_chanda](https://forum.ansible.com/u/ashish_chanda)\
**Post date:** [November 26, 2016, 6:10am UTC](https://forum.ansible.com/t/getting-access-denied-while-creating-cluster-on-win2012-r2-using-pywinrm/23107/1 "2016-11-26T06:10:44Z")

</div>

Hi,

I am using Ansible PywinRm to connect and run powershell on the remote windows 2012 R2 server.

I am getting the error

# access denied on new cluster command on adding the second node to the cluster.

Below are the connection details

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.

Thanks,  
Ashish
