# How do I use a smart Inventory to get Windows Hosts?

**URL:** <https://forum.ansible.com/t/how-do-i-use-a-smart-inventory-to-get-windows-hosts/35048>\
**Category:** AWX Project\
**Tags:** windows\
**Created:** [April 25, 2021, 11:36pm UTC](https://forum.ansible.com/t/how-do-i-use-a-smart-inventory-to-get-windows-hosts/35048 "2021-04-25T23:36:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Brandon\_Ellis](https://avatars.discourse-cdn.com/v4/letter/b/dec6dc/32.png) [@Brandon\_Ellis](https://forum.ansible.com/u/Brandon_Ellis)\
**Post date:** [April 25, 2021, 11:36pm UTC](https://forum.ansible.com/t/how-do-i-use-a-smart-inventory-to-get-windows-hosts/35048/1 "2021-04-25T23:36:50Z")

</div>

I’m still new to the Tower interface and I’m having trouble understanding the smart inventory filters

What kind of filter would I need to make to only grab “Windows” machines? I noticed that the “variables” section of each host has a key-pair “platform”: “windows”

Would I just be checking if “variables” contains “platform”: “windows”? It seems really messy…

 ![smartinventory.png](https://us1.discourse-cdn.com/ansible/original/2X/8/8968236e0258f3f01f84086f8ee7157e93ce4eff.png)

---

<div class="post-metadata">

**Author:** ![Brandon\_Ellis](https://avatars.discourse-cdn.com/v4/letter/b/dec6dc/32.png) [@Brandon\_Ellis](https://forum.ansible.com/u/Brandon_Ellis)\
**Post date:** [April 25, 2021, 11:46pm UTC](https://forum.ansible.com/t/how-do-i-use-a-smart-inventory-to-get-windows-hosts/35048/2 "2021-04-25T23:46:19Z")

</div>

Never mind, even if I do try that, I get the error:

Invalid query variables\_\_contains=“platform”: “windows”

---

<div class="post-metadata">

**Author:** ![Brandon\_Ellis](https://avatars.discourse-cdn.com/v4/letter/b/dec6dc/32.png) [@Brandon\_Ellis](https://forum.ansible.com/u/Brandon_Ellis)\
**Post date:** [April 25, 2021, 11:46pm UTC](https://forum.ansible.com/t/how-do-i-use-a-smart-inventory-to-get-windows-hosts/35048/3 "2021-04-25T23:46:36Z")

</div>

Is there a better way to filter by OS?
