WinRMOperator

WinRM

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

View Source

Last Updated: Apr. 2, 2021

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_hookairflow.providers.microsoft.winrm.hooks.winrm.WinRMHookpredefined ssh_hook to use for remote execution
ssh_conn_idstrconnection id from airflow Connections
remote_hoststrremote host to connect
commandstrcommand to execute on remote host. (templated)
ps_pathstrpath to powershell, powershell for v5.1- and pwsh for v6+. If specified, it will execute the command as powershell script.
output_encodingstrthe encoding used to decode stout and stderr
timeoutinttimeout for executing the command.

Documentation

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

Was this page helpful?