Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.
Rem Runs Ping command, outputs results to text file. Set objShell = CreateObject("WScript.Shell") Set objFSO = CreateObject("Scripting.FileSystemObject") strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colItems = objWMIService.ExecQuery _ ("Select * From Win32_LogicalDisk Where DriveType = 3") For Each objItem in colItems strDriveLetter = objItem.DeviceID strCommand = "ping 192.xxx.x.xxx -w 999" Set objExecObject = objShell.Exec(strCommand) Do While Not objExecObject.StdOut.AtEndOfStream strResults = objExecObject.StdOut.ReadAll() Loop strText = strText & strResults Next Rem Sends email alert Set objFile = objFSO.CreateTextFile("C:\PingFailed.txt") objFile.Write strText objFile.Close Set objEmail = CreateObject("CDO.Message") objEmail.From = "VPN_Dissconnect@domain.com" objEmail.To = "email@example.com" objEmail.Subject = "VPN from office to RemoteSite just disconnected" objEmail.Textbody = "The ping time from the Office to RemoteSite was just over 999ms, indicating the VPN probably disconnected." & strDate objEmail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 objEmail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _ "SMTP_server_name" objEmail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 objEmail.Configuration.Fields.Update objEmail.Send Rem Renames text file with time and date
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|Writing lines of code from a form output in script within a results page||2||37|
|VBA or Script to identify files which are duplicate in a folder||6||42|
|creating a random password in batch||4||36|
|Autorun Remote Desktop - USB Stick||6||67|