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.
Option Explicit Dim nameSpace Dim objSet Dim dateTime Dim vDate Dim obj Dim age Dim Time, AmPm, Hour Dim aParts If Hour >= 18 Then Msg = " This occurred after 6 PM" 'Else 'Msg = " This occurred before 6 PM" End If Set dateTime = CreateObject("WbemScripting.SWbemDateTime") Set nameSpace = GetObject("winmgmts://localhost/root/cimv2") Set objSet = nameSpace.ExecQuery("select * from Win32_ShadowCopy") If objSet.Count > 0 Then For Each obj In objSet dateTime.Value = obj.InstallDate vDate = dateTime.GetVarDate(True) aParts = Split(vDate, " ") Time = aParts(1) AmPm = aParts(2) aParts = Split(Time, ":") If AmPm = "PM" Then Hour = aParts(0) + 12 Else Hour = aParts(0) End If 'WScript.Echo "- Snapshot on " & obj.VolumeName & " @ " & vDate age = DateDiff("d", vDate, Date) If age > 3 And Hour <> 18 Then 'WScript.Echo "[Deleting snapshot...] for " & obj.Caption & " created on " & vDate obj.Delete_() End If Next End If[embed=file 690800]
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.