Skip to content

windows

windows

The windows module handles misc windows operations.

reboot()

Restart the server.

service(service, running=True, restart=False, suspend=False)

Stop/Start a Windows service.

  • service: name of the service to manage
  • running: whether the the service should be running or stopped
  • restart: whether the the service should be restarted
  • suspend: whether the the service should be suspended

Example:

.. code:: python

windows.service(
    name="Stop the spooler service",
    service="service",
    running=False,
)