Powershell Script execution

Hi All,

I’m curious if this is possible,

At a very high level, for the connectivity testing on different servers, I’ve to follow below steps:

  1. Push two Powershell script to each server
  2. Run the two PowerShell scripts on each server (listener and client)
  3. Capture output and email to stakeholders

Can this be done with ansible?

regards

Yes

Thanks, can you please advise how to capture the output and emailed to stakeholders.

Sure. First register the output:

https://docs.ansible.com/ansible/latest/user_guide/playbooks_variables.html#registering-variables

Then send the mail:

https://docs.ansible.com/ansible/latest/modules/mail_module.html

Dick