# Service restart in Windows Operating system  using playbooks

**URL:** <https://forum.ansible.com/t/service-restart-in-windows-operating-system-using-playbooks/29209>\
**Category:** Ansible Project\
**Tags:** windows, rhel\
**Created:** [December 6, 2018, 7:43am UTC](https://forum.ansible.com/t/service-restart-in-windows-operating-system-using-playbooks/29209 "2018-12-06T07:43:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Suma\_P](https://avatars.discourse-cdn.com/v4/letter/s/ccd318/32.png) [@Suma\_P](https://forum.ansible.com/u/Suma_P)\
**Post date:** [December 6, 2018, 7:43am UTC](https://forum.ansible.com/t/service-restart-in-windows-operating-system-using-playbooks/29209/1 "2018-12-06T07:43:28Z")

</div>

Hi Team ,

I am trying to restart the spooler service in windows remotely by creating playbooks in RHEL Operating system .its trowing below error.kindly suggest me to resolve this issue.

playbook content :

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [December 8, 2018, 10:00am UTC](https://forum.ansible.com/t/service-restart-in-windows-operating-system-using-playbooks/29209/2 "2018-12-08T10:00:24Z")

</div>

Hi,

You need to tell the playbook which hosts you want to run your tasks on, something like the following (not tested).
