Team,
Ansible ‘win_shell’ working on one server and giving error on another:
Success on ‘mytest.mydomain.com’ with .Net framework 4.5 and PowerShell 4.
[user@server1]# ansible -i /etc/ansible/hosts windows-servers -m win_shell -a ‘dir’
mytest.mydomain.com | SUCCESS | rc=0 >>
Directory: C:\Users\Administrator.MYTESTDC1
Mode LastWriteTime Length Name
d-r-- 2/2/2018 5:11 AM Contacts
d-r-- 2/28/2018 1:37 AM Desktop
d-r-- 3/8/2018 3:45 AM Documents
d-r-- 2/28/2018 1:36 AM Downloads
d-r-- 2/2/2018 5:11 AM Favorites
d-r-- 2/2/2018 5:11 AM Links
d-r-- 2/2/2018 5:11 AM Music
d-r-- 2/2/2018 5:11 AM Pictures
d-r-- 2/2/2018 5:11 AM Saved Games
d-r-- 2/2/2018 5:11 AM Searches
d-r-- 2/2/2018 5:11 AM Videos
Failure o****n 'win01.itnetwork.com’ with .Net framework 4.5 and PowerShell 3. (other Ansible modules are working OK)
[user@server1]# ansible -i /etc/ansible/hosts WIN01 -m win_shell -a ‘dir’
win01.itnetwork.com | FAILED | rc=1 >>
Thread failed to start.
non-zero return code
Ansible Server Version: 2.5.0
Please suggest what could be the reason of error and how it can be resolved?
Thank you,
Dinesh Vashisht