pywinrm
Python library for Windows Remote Management
Decision gist · record as of 2026-08-14
Yes. pywinrm is actively maintained, has no known vulnerabilities, installs with low friction, and is widely used in production. It is the standard choice for Python-based Windows remote management. Install it if you need to automate Windows systems from Python.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.8 or later; target Windows machine must have WinRM enabled and accessible on port 5985 (HTTP) or 5986 (HTTPS).
- Low install friction with a pure-Python wheel distribution.
- The package is actively maintained with recent commits and is used by Ansible for Windows support, indicating production-grade reliability.
License · maintenance · safety
permissive license (permissive) — MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
last release 2024-07-16 (759 days) · last repo commit 2026-08-04 · 1,137 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 6,938,328 downloads/mo, #1,806 on PyPI
Alternatives
Verify before relying
pip install pywinrm
import pywinrm
s = pywinrm.Session('windows-host.example.com', auth=('username', 'password'))
r = s.run_cmd('ipconfig', ['/all'])
print(r.std_out)- Whether optional dependencies (requests-kerberos, requests-credssp) are automatically installed or require manual setup for Kerberos/CredSSP auth.
- Performance characteristics when running many concurrent remote commands or large scripts.
- Compatibility with non-standard WinRM configurations or older Windows Server versions.
What it is and what it does
pywinrm is a Python client library that communicates with Windows Remote Management (WinRM) to execute commands and scripts on remote Windows systems. It abstracts the WinRM protocol over HTTP/HTTPS, handling authentication (basic, NTLM, Kerberos, CredSSP, certificate-based) and message encryption. The library provides both a high-level Session API for simple command execution and a low-level Protocol API for fine-grained control. It depends on requests, requests-ntlm, and xmltodict for HTTP communication, NTLM authentication, and XML parsing.
The package is designed for systems administrators and DevOps engineers who need to automate Windows management tasks from Linux, macOS, or Windows machines. It supports running batch scripts, PowerShell scripts, and WMI queries, with automatic endpoint URL resolution and CLIXML-to-text conversion for PowerShell error output.
Use it for
- Automate Windows server configuration and patching from a Linux control machine using batch or PowerShell scripts.
- Query WMI data (system info, installed software, event logs) from remote Windows hosts in a Python management script.
- Build multi-platform infrastructure-as-code tools that manage both Linux and Windows systems from a single Python codebase.
- Implement custom monitoring or compliance checks that run PowerShell on remote Windows machines and parse results in Python.
- Integrate Windows command execution into orchestration workflows for heterogeneous environment management.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
pywinrm is actively maintained, has no known vulnerabilities, installs with low friction, and is widely used in production. It is the standard choice for Python-based Windows remote management. Install it if you need to automate Windows systems from Python.
Install
pywinrm on PyPI
Before you install
Low install friction with a pure-Python wheel distribution. The package is actively maintained with recent commits and is used by Ansible for Windows support, indicating production-grade reliability.
Requires Python 3.8 or later; target Windows machine must have WinRM enabled and accessible on port 5985 (HTTP) or 5986 (HTTPS).
License in practice
MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
Quickstart
pip install pywinrm
import pywinrm
s = pywinrm.Session('windows-host.example.com', auth=('username', 'password'))
r = s.run_cmd('ipconfig', ['/all'])
print(r.std_out)
Verify before relying
- Whether optional dependencies (requests-kerberos, requests-credssp) are automatically installed or require manual setup for Kerberos/CredSSP auth.
- Performance characteristics when running many concurrent remote commands or large scripts.
- Compatibility with non-standard WinRM configurations or older Windows Server versions.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesrequestsrequests-ntlmxmltodict |
| Maintenance | Actively maintained 759 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 6,938,328 / month, #1,806 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaEnvironment :: ConsoleIntended Audience :: DevelopersIntended Audience :: System AdministratorsLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries :: Python ModulesTopic :: System :: ClusteringTopic :: System :: Distributed ComputingTopic :: System :: Systems Administration |
Evidence: pywinrm-0.5.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “windows remote management python”
- pywinrmpywinrm is a Python client for Windows Remote Management (WinRM) that…
- pypsexecRuns commands on remote Windows hosts via SMB/RPC without requiring…
- apache-airflow-providers-microsoft-winrmIntegrates Windows Remote Management (WinRM) into Apache Airflow,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also pypsrp · apache-airflow-providers-microsoft-winrm · pypsexec · smbprotocol · requests-credssp · requests-negotiate-sspi · httpx-ntlm · requests-ntlm · pyspnego · winkerberos