Skip to content

Minor adjustemnts for Detect-WindowsFirewallLogging.ps1 #2

Description

@raulk89

Hi

Just to let you know.

Detect-WindowsFirewallLogging.ps1

For domain profile being active, you should consider adding "-PolicyStore ActiveStore" for this command (which is the sum of all polycistores).
I believe, by default it uses local store, which is PersistentStore" and then the script assumes the results as totally wrong.

$currentProfile = Get-NetFirewallProfile -Name $profileName

Also, this should be interpreted as equal. Currenlty it does not take into account built in variables.

C:\Windows\system32\logfiles\firewall\domainfw.log
vs
%SystemRoot%\system32\logfiles\firewall\domainfw.log

Something like this:

if ($currentProfile.LogFileName -ne $logFileName) {
->
if ([System.Environment]::ExpandEnvironmentVariables($currentProfile.LogFileName) -ne $logFileName) {

Regards
Raul

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions