Jump to content

Heartbeat program for Windows computer


PhanTomiZ

Recommended Posts

Posted

VBS Script:

 
Set WshShell = WScript.CreateObject("WScript.Shell")
'Set http = CreateObject("MSXML2.serverXMLHTTP")
'Set http = CreateObject("MSXML2.XMLHTTP")
Set http = CreateObject("Microsoft.XmlHttp")
 
 
' If auth is required, replace the userName and password values
' with the ones you use on your ISY
userName = "ISY Username"
password = "ISY Password"
 
http.open "GET", url, false, userName, password
http.send 
 
Set userName = Nothing
Set password = Nothing
Set myFSO = Nothing 
set WshShell = nothing
set http = nothing
set objXmlDoc = Nothing 

 

 

...and in Powershell....

$isy_user = "ISY Username"
$isy_password = "ISY Password"
$url = "http://ISYIP:ISYPort/rest/vars/set/2/72/9"
$authVal = "Basic " + [System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($isy_user + ":" + $isy_password))
$response = Invoke-WebRequest -Uri $url -Headers @{"AUTHORIZATION"=$authVal}
$response.Content
Posted

Hi Scottmichaelj

 

@Michel can this be added to the wiki? Others might find it good info.

I am not sure what I'll be posting to the Wiki and where to put it. I can certainly put a link in the Wiki to point back to this post.

 

With kind regards,

Michel

Guest
This topic is now closed to further replies.

  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

    • There are no registered users currently online
  • Forum Statistics

    • Total Topics
      37.2k
    • Total Posts
      372.5k
×
×
  • Create New...