arjunanan6 commented on PR #34766:
URL: https://github.com/apache/airflow/pull/34766#issuecomment-1829478975

   > @arjunanan6 you don't need to actually invoke any command; instead, simply 
enter into the hook context:
   > 
   > ```python
   > with PsrpHook(psrp_conn_id=self.conn_id):
   >     pass
   > ```
   > 
   > This will raise an exception if there is a connection error.
   > 
   > It works because entering the hook will in turn [enter into the runspace 
pool 
context](https://github.com/jborean93/pypsrp/blob/d2a3eca257230e40354d39ca008639992f8495a4/src/pypsrp/powershell.py#L257),
 which automatically connects it to the remote machine, establishing a 
connection.
   
   Ah interesting, so I overdid it then. I'll make a change shortly and push it.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to