--- id: pywinrm version: "0.5.0" license: Copyright (c) 2013 Alexey Diyan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the… (full text in the JSON record) license_treatment: permissive maintenance: active --- # pywinrm — Python library for Windows Remote Management License: permissive · Maintenance: active · Downloads: 6.9M/mo ## 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 above — verify before relying. pywinrm is a Python client for Windows Remote Management (WinRM) that lets you run commands, PowerShell scripts, and fetch WMI data on remote Windows machines from any machine running Python. 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 pip install pywinrm uv add pywinrm poetry add pywinrm ## Installing pywinrm 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. 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) Requires Python 3.8 or later; target Windows machine must have WinRM enabled and accessible on port 5985 (HTTP) or 5986 (HTTPS). 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: Copyright (c) 2013 Alexey Diyan Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the… (full text in the JSON record) (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 6.9M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags windows remote management python, winrm client library, remote command execution windows, powershell script automation, windows system administration python, ntlm kerberos authentication, remote windows management, windows-automation, remote-execution, devops [View on SkillFed](https://skillfed.io/packages/pywinrm) · [View on PyPI](https://pypi.org/project/pywinrm/)