{"id":23265,"library":"apache-airflow-providers-microsoft-psrp","title":"Microsoft PSRP Provider for Apache Airflow","description":"Apache Airflow provider for Microsoft PowerShell Remoting Protocol (PSRP), enabling remote execution of PowerShell commands and scripts on Windows hosts. Current version 3.2.5, part of the official Airflow providers collection. Releases follow Airflow's provider release cadence.","status":"active","version":"3.2.5","language":"python","source_language":"en","source_url":"https://github.com/apache/airflow/tree/main/airflow/providers/microsoft/psrp","tags":["airflow","provider","microsoft","psrp","powershell","winrm"],"install":[{"cmd":"pip install apache-airflow-providers-microsoft-psrp","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"This is an Airflow provider; requires Airflow >=2.1.0 (for provider support)","package":"apache-airflow","optional":false},{"reason":"Underlying library for PowerShell Remoting Protocol (PSRP) client","package":"pypsrp","optional":false}],"imports":[{"note":"Standard import after Airflow 2.x.","symbol":"PsrpOperator","correct":"from airflow.providers.microsoft.psrp.operators.psrp import PsrpOperator"},{"note":"Hook for PSRP connections.","symbol":"PsrpHook","correct":"from airflow.providers.microsoft.psrp.hooks.psrp import PsrpHook"}],"quickstart":{"code":"from datetime import datetime\nfrom airflow import DAG\nfrom airflow.providers.microsoft.psrp.operators.psrp import PsrpOperator\n\ndag = DAG(\n    'example_psrp',\n    start_date=datetime(2025, 1, 1),\n    schedule_interval=None,\n    catchup=False\n)\n\nrun_powershell = PsrpOperator(\n    task_id='run_command',\n    conn_id='psrp_default',  # must be configured in Airflow connections\n    command='Get-Process | Format-Table -AutoSize',\n    dag=dag\n)","lang":"python","description":"Minimal DAG that runs a PowerShell command on a remote Windows host via PSRP. Requires a configured Airflow connection with host, login, password, etc."},"warnings":[{"fix":"Use the correct install command: pip install apache-airflow-providers-microsoft-psrp and import from airflow.providers.microsoft.psrp.","message":"Provider package was renamed from 'airflow-provider-microsoft-psrp' to 'apache-airflow-providers-microsoft-psrp' around Airflow 2.0. Old import paths are deprecated.","severity":"breaking","affected_versions":"<2.0"},{"fix":"On Windows, run: Enable-PSRemoting -Force. Adjust firewall rules to allow WinRM traffic.","message":"The PSRP operator communicates over WinRM (port 5985/5986). Ensure the target Windows host has WinRM enabled and configured for PSRP. Firewall rules must allow the port.","severity":"gotcha","affected_versions":"all"},{"fix":"For testing, use NTLM with a local admin account. For production, prefer Kerberos or SSL with Basic.","message":"Authentication methods (NTLM, Kerberos, Basic) require careful setup. Kerberos needs appropriate SPN and DNS configuration; Basic requires SSL.","severity":"gotcha","affected_versions":"all"},{"fix":"Recreate connections using the Airflow UI for the PSRP provider; avoid manual extras in connection string.","message":"Some older connection parameters (like 'port') may not be supported in newer provider versions. Always use the connection UI fields as documented.","severity":"deprecated","affected_versions":">=3.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'pip install apache-airflow-providers-microsoft-psrp' and ensure Airflow is installed (version 2.1+).","cause":"The provider package is not installed or Airflow providers namespace is missing.","error":"ModuleNotFoundError: No module named 'airflow.providers.microsoft'"},{"fix":"Verify WinRM is enabled: run 'Enable-PSRemoting -Force' on the Windows host and check firewall rules for port 5985 (HTTP) or 5986 (HTTPS).","cause":"WinRM service not running or port blocked on target Windows host.","error":"pypsrp.exceptions.WinRMTransportError: ('http', 'Connection refused')"},{"fix":"Double-check the Airflow connection credentials. Ensure the authentication type (NTLM, Kerberos, Basic) matches the server configuration. For NTLM, use DOMAIN\\username format.","cause":"Incorrect username/password, or authentication protocol mismatch between client and server.","error":"pypsrp.exceptions.AuthenticationError: Authentication failed, check credentials"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}