Lists service properties for the Windows Firewall current profile
Set objFirewall = CreateObject("HNetCfg.FwMgr")Set objPolicy = objFirewall.LocalPolicy.CurrentProfileSet colServices = objPolicy.ServicesFor Each objService in colServicesWscript.Echo "Service name: " & objService.NameWscript.Echo "Service enabled: " & objService.EnabledWscript.Echo "Service type: " & objService.TypeWscript.Echo "Service IP version: " & objService.IPVersionWscript.Echo "Service scope: " & objService.ScopeWscript.Echo "Service remote addresses: " & objService.RemoteAddressesWscript.Echo "Service customized: " & objService.CustomizedSet colPorts = objService.GloballyOpenPortsFor Each objPort in colPortsWscript.Echo "Port name: " & objPort.NameWscript.Echo "Port number: " & objPort.PortWscript.Echo "Port enabled: " & objPort.EnabledWscript.Echo "Port built-in: " & objPort.BuiltInWscript.Echo "Port IP version: " & objPort.IPVersionWscript.Echo "Port protocol: " & objPort.ProtocolWscript.Echo "Port remote addresses: " & objPort.RemoteAddressesWscript.Echo "Port scope: " & objPort.ScopeNextWscript.EchoNext
This is a VB Script, this can be used by saving the file in .vbs file