Home Assistant to call a script - ssh, powershell, etc

Hi there. I was wondering if there’s a way for home assistant to call a script or SSH to a machine to run a command. I won’t bore you with the details of what I want to do but essentially…

It would be amazing if I could flip a physical switch and have a Windows machine run program X. When person A is detected at home on a Tuesday, have Windows machine run application Y. Is there any way of doing something like this? I’m fine with even an SSH connection to call a powershell script really.

Even if it were as simple as “create text document in this folder named ABC” - I’ll have Windows do the rest, I just need something to link the two of them.

A Command Line Switch would do it. Could call ssh into Windows with OpenSSH installed to run pwsh.

1 Like

I’m using Hass.Agent on a Windows instance to do this but would like to do this without needing another host when you can use Powershell on Linux. Was going to make it a Feature Request to add pwsh to HAOS.

1 Like