Tag Archives

Archive of posts published in the tag: VBS

VBS script to send an HTTP request

Another post with little script: Set o = CreateObject(“MSXML2.XMLHTTP”) o.open “GET”, “https://page.com”, False o.setRequestHeader “Header”, “Header value” ‘ Ignore certs (I bet you want to know how to do it) ‘ 2 stands for SXH_OPTION_IGNORE_SERVER_SSL_CERT_ERROR_FLAGS ‘ 13056 means ignore all server side cert…

VBS script to check if workstation is locked

Well, here it is: Function IsWorkstationLocked( computer ) Dim wmi : Set wmi = GetObject(“winmgmts://” & computer & “/root/cimv2”) Dim logonScreenCount : logonScreenCount = wmi.ExecQuery (“SELECT * FROM Win32_Process WHERE Name = ‘LogonUI.exe'”).Count IsWorkstationLocked = (logonScreenCount > 0) End Function Dim o If…

Running VBS script in IIS

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.…