Sometimes you might want to deploy an incoming webhook for very simple use and do something when it’s called. On Windows you don’t need to have a full blown ASP.NET pipeline or even PHP server installed, you can go with simple VBS script. In this post I describe how to configure IIS to expose such a script and be able to accept incoming connections.
- Install IIS and CGI module
- Go to IIS and choose the site for VBS scripts
- Open Handler Mappings and choose Add Script Map…
- Set Request Path to *.vbs
- For Executable use the “C:\Windows\System32\cscript.exe” //NOLOGO %s %s
- Name it anything you would like
That’s it. Do not forget to add a binding.
Now a simple script responding to a request.
WScript.Echo "Content-Type: text/html"
WScript.Echo "Access-Control-Allow-Origin: *"
WScript.Echo "Yep, I'm here!"
You actually need to start output in the first two lines of your script or else will ignore it. Apart from that you can do basically anything you like.