btreinders Posted October 19, 2016 Share Posted October 19, 2016 @Michel can this be added to the wiki? Others might find it good info. I have no issue with Michel putting this on the wiki. Link to comment
MWareman Posted October 19, 2016 Share Posted October 19, 2016 VBS Script: Set WshShell = WScript.CreateObject("WScript.Shell") 'Set http = CreateObject("MSXML2.serverXMLHTTP") 'Set http = CreateObject("MSXML2.XMLHTTP") Set http = CreateObject("Microsoft.XmlHttp") URL ="http://ISYIP:ISYPort/rest/vars/set/2/72/9" ' 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 Link to comment
Michel Kohanim Posted October 20, 2016 Share Posted October 20, 2016 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 Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.