pypsrp
PowerShell Remoting Protocol and WinRM for Python
Decision gist · record as of 2026-08-14
Yes. Active maintenance, low install friction, permissive MIT license, and no known vulnerabilities make this a solid choice for Windows remote automation. Install it if you need to execute commands or manage files on Windows hosts from Python. Verify that your target Windows environment has WinRM enabled and that you have the necessary authentication credentials or certificates.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires CPython 3.10 or later.
- Target Windows host must have WinRM service enabled and accessible over HTTP/HTTPS (default ports 5985/5986).
- Optional: system Kerberos libraries for Kerberos auth, or requests-credssp for CredSSP auth.
License · maintenance · safety
MIT (permissive) — MIT license permits commercial and private use with minimal restrictions, making it suitable for most deployment scenarios.
last release 2026-03-16 (151 days) · last repo commit 2026-03-16 · 379 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 4,416,612 downloads/mo, #2,310 on PyPI
Alternatives
Verify before relying
pip install pypsrp
from pypsrp.client import Client
client = Client('remote-host', username='user', password='pass')
stdout, stderr, rc = client.execute_cmd('dir')
print(stdout)- Whether the library supports SSH transport as mentioned in the description excerpt as a future goal
- Performance characteristics and scalability limits for concurrent remote operations
- Compatibility with non-standard WinRM configurations or hardened Windows environments
What it is and what it does
pypsrp is a Python client library for the PowerShell Remoting Protocol (PSRP) and Windows Remote Management (WinRM) service. It enables you to execute commands, run PowerShell scripts, and transfer files to and from remote Windows hosts from any machine running Python. The library provides multiple API layers: a simple client API for common tasks (command execution, file copy), a WSMan interface for low-level protocol operations, a Windows Remote Shell (WinRS) layer for cmd execution, and a PSRP layer for creating remote runspace pools and pipelines.
The package supports multiple authentication methods including Basic, Certificate, NTLM, Negotiate/Kerberos, and CredSSP (the latter two requiring optional dependencies). It handles TLS encryption and message-level encryption, with configurable timeouts, proxies, and locale settings. The library is designed around three main components: Transport (raw message handling), Shell (protocol details), and Process (execution within a shell). It currently supports only WSMan over HTTP/HTTPS but is architected to support SSH in the future.
Use it for
- Automate Windows server administration tasks from a Linux or macOS control machine without installing Windows-specific tools.
- Execute PowerShell scripts remotely to deploy applications, configure services, or gather system information from Windows hosts.
- Transfer files between a local machine and remote Windows servers as part of deployment or backup workflows.
- Build cross-platform infrastructure-as-code tools that manage both Unix and Windows environments from a single Python codebase.
- Create interactive remote runspace pools with multiple PowerShell pipelines for complex, asynchronous Windows automation scenarios.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Active maintenance, low install friction, permissive MIT license, and no known vulnerabilities make this a solid choice for Windows remote automation. Install it if you need to execute commands or manage files on Windows hosts from Python. Verify that your target Windows environment has WinRM enabled and that you have the necessary authentication credentials or certificates.
Install
pypsrp on PyPI
Before you install
Low install friction with a pure-Python wheel distribution. Active maintenance with recent commits and a stable release cycle. Requires cryptography, pyspnego, and requests as runtime dependencies, all widely maintained.
Requires CPython 3.10 or later. Target Windows host must have WinRM service enabled and accessible over HTTP/HTTPS (default ports 5985/5986). Optional: system Kerberos libraries for Kerberos auth, or requests-credssp for CredSSP auth.
License in practice
MIT license permits commercial and private use with minimal restrictions, making it suitable for most deployment scenarios.
Quickstart
pip install pypsrp
from pypsrp.client import Client
client = Client('remote-host', username='user', password='pass')
stdout, stderr, rc = client.execute_cmd('dir')
print(stdout)
Verify before relying
- Whether the library supports SSH transport as mentioned in the description excerpt as a future goal
- Performance characteristics and scalability limits for concurrent remote operations
- Compatibility with non-standard WinRM configurations or hardened Windows environments
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagescryptographypyspnegorequests |
| Maintenance | Actively maintained 151 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 4,416,612 / month, #2,310 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14 |
Evidence: pypsrp-0.9.1-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 execution python”
- pypsrpExecute commands, scripts, and file operations on remote Windows…
- pypsexecRuns commands on remote Windows hosts via SMB/RPC without requiring…
- pywinrmpywinrm is a Python client for Windows Remote Management (WinRM) that…
Give your agent the search over MCP, or paste the wish link into any chat.
More Networking packages
h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.
psutil retrieves real-time information about running processes and system resources (CPU, memory, disks, network, sensors) across multiple operating systems, enabling system monitoring, process profiling, and resource management.
pyOpenSSL wraps OpenSSL's SSL/TLS functionality for Python, providing high-level connection objects and certificate handling through a Python-friendly interface around OpenSSL's cryptographic operations.
uvloop is a drop-in replacement for Python's built-in asyncio event loop, implemented in Cython and using libuv, that accelerates async I/O operations.
execnet lets you spawn and communicate with Python interpreters across local processes, remote hosts, and different platforms, using a simple API for task distribution and inter-process messaging.
However, the aging maintenance status (275 days since last release) means you should verify it meets your concurrency and performance needs before committing to a…
PyZMQ provides Python bindings for ZeroMQ (ØMQ), a lightweight messaging library that enables fast, asynchronous communication between distributed processes and applications.
See also pypsexec · pywinrm · apache-airflow-providers-microsoft-psrp · requests-credssp · sspilib · smbprotocol · requests-negotiate-sspi · apache-airflow-providers-microsoft-winrm · pyspnego · srp