sleevezipper / hass-workstation-service

Provide useful sensors and services from your workstation to Home Assistant.
Apache License 2.0
615 stars 53 forks source link

Feature Request: Powershell #36

Open rEs-84 opened 3 years ago

rEs-84 commented 3 years ago

Ability to return a PowerShell value (likely more useful than WMI), either by a single one liner / multiple lines or a execute ps1 file.

Personally i'd like the ability to find out if an active RDP session is open, instead of console session. Which i'd use inconjunction with the SessionState sensor

Various ways of finding out via running built in applications, but without retrieving their value its tricky. For example the windows variable has it as console or rdp (echo %sessionname%), qwinsta shows it, as does query user

sleevezipper commented 3 years ago

Thanks for creating an issue! This seems related to #29 but more focused on Powershell.

rEs-84 commented 3 years ago

Ah didn’t spot that one, looked around a few based on topics Etc.

I just thought powershell would be more usefully then wmi directly, as it can do more modern wmi queries easily too.

ImaBadCoder commented 3 years ago

I could definitely see the need for this. If we could run a PS command to grab data, then several of the requests would be addressed. For instance, showing the IP, would be easy.