Executing powershell script via ansible playbook is not working properly

Hi,

I’m trying to execute powershell script via ansible, however playbook is successfully running but its incomplete. same script if I run directely on windows server its perfectly working, its failing whenever i ran through ansible playbook.

Please find below details of playbook, inventory, ansible debug, error.

Kindly review my request and suggest me a solution for this problem.

Hello,

when: “‘ECode**==**0’ in Invoke_PreCC_out.stdout_lines”

here you should use ‘==’ since single ‘=’ is an assignment in Ansible.

BR,
Roland