WinRMOperator

WinRM

WinRMOperator to execute commands on given remote host using the winrm_hook.

View on GitHub

Last Updated: Oct. 23, 2022

Access Instructions

Install the WinRM provider package into your Airflow environment.

Import the module into your DAG file and instantiate it with your desired params.

Parameters

winrm_hookpredefined ssh_hook to use for remote execution
ssh_conn_idconnection id from airflow Connections
remote_hostremote host to connect
commandcommand to execute on remote host. (templated)
ps_pathpath to powershell, powershell for v5.1- and pwsh for v6+. If specified, it will execute the command as powershell script.
output_encodingthe encoding used to decode stout and stderr
timeouttimeout for executing the command.

Documentation

WinRMOperator to execute commands on given remote host using the winrm_hook.

Was this page helpful?