I have kept vbscript with just messagebox in mdt after validate section and it got executed.
Similarly I kept another vbscript after that calling an API and able to retrieve the result from it also.
Is there anyway to exit the complete task sequence based on the value of this api result?
If possible to set an exact message there also like we wantedly exited the MDT.
My script.
Option Explicit
MsgBox("from 2 psdsss")
Dim restReq, url, userName, password
Set restReq = CreateObject("Microsoft.XMLHTTP")
' Replace <node> with the address of your INSTEON device
' Additionally, any REST command will work here
url = "http://20.117.158.5:80/machines/1"
' If auth is required, replace the userName and password values
' with the ones you use on your ISY
userName = "admin"
password = "<yourpassword>"
restReq.open "GET", url, false, userName, password
restReq.send
MsgBox(restReq.responseText)
WScript.echo restReq.responseText
My task sequence snap for reference: snap