# Test connectivity onto windows hosts

**URL:** <https://forum.ansible.com/t/test-connectivity-onto-windows-hosts/35369>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [June 17, 2021, 11:32pm UTC](https://forum.ansible.com/t/test-connectivity-onto-windows-hosts/35369 "2021-06-17T23:32:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![omoeko](https://avatars.discourse-cdn.com/v4/letter/o/e47774/32.png) [@omoeko](https://forum.ansible.com/u/omoeko)\
**Post date:** [June 17, 2021, 11:32pm UTC](https://forum.ansible.com/t/test-connectivity-onto-windows-hosts/35369/1 "2021-06-17T23:32:14Z")

</div>

Hi All,

I have got an ansible tower setup, I am trying to test out which servers my saved credential has access to. To this effect, I am wondering what is the best way to achive this task ?

Create a dynamic inventory and then write a script to run on the host ?  
The script needs to be able to do a simple task such as grab the hostname, time and the credential context from the server. I will then need to collect a log of the output and save it in a log or import onto a database for analysis of which servers the credential worked on and which ones failed.

The hosts are all windows hosts, I was tempted to use powershell as a scripting language, but this might not be a good idea as the powershell version on the target host might be different, so plain old dos would suffice.

Any ideas please.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [June 18, 2021, 2:00pm UTC](https://forum.ansible.com/t/test-connectivity-onto-windows-hosts/35369/2 "2021-06-18T14:00:23Z")

</div>

win\_ping is designed to test 'minmal access to use ansible'
