Jump to content

PowerShell Script Launchers


TFay

Recommended Posts

Posted (edited)

These sample ISY network resources can be used to launch PowerShell scripts on a Windows host that can speak to guests are your gate, welcome you home, inform you if the garage door has been left open, etc. 

You can create scripts that are as simple or as complex as you'd like. 

I have attached a pair of simple scripts that announce if your garage door is open or closed.

I have also attached a rather complex set of scripts and supporting files that when triggered by a Weigand Access Controller will grab the swipe log from the Access Controller, parse it, and use that to announce a customer welcome to that specific gate user, as well as inform them if rain is expected (based off .json forecast data from Weather Underground). 

To launch PowerShell scrips remotely, you will need to make sure the scripts are in your $PATH, and configure PSExec from Microsoft's PSTools collection to allow for remote execution. You will also need to replace the basic authentication in these network resources with username and password for your Windows host. You will also need to enable something like HTTPListener (by Steve Lee) with settings such as those in the attached HttpListener_Start.ps1 script. 

https://learn.microsoft.com/en-us/sysinternals/downloads/pstools

Simple HTTP api for Executing PowerShell Scripts - PowerShell Team (microsoft.com)

I've attached the HTTPListener script by Steve Lee, as the link to his PowerShell script in the blog above appears to be no longer working. There may be a newer version available, or alternative solutions, but this works well with ISY. 

ISY PowerShell_Script_Launchers.zipHTTPListener-1.0.2.modified.zip Sample Powershell Scripts.zip

HttpListener_Start.ps1 HTTPListener-1.0.2.modified.zip

Edited by TFay
  • Like 1
Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Forum Statistics

    • Total Topics
      37k
    • Total Posts
      371.4k
×
×
  • Create New...