Get-NetFirewallRule reports different info than GUI

Shaunm001 306 Reputation points
2021-05-11T17:09:33.3+00:00

Im running this command in powershell to get info on firewall rules:

Get-NetFirewallRule -Action Allow -Enabled True -Direction Inbound -PolicyStore ActiveStore

and seeing some inconsistent results compared to what the Windows Firewall with Advanced Security (GUI) says.

For example, GUI shows these two Remote Desktop rules with authentication/encryption enabled:

95607-image.png

But PowerShell reports that Authentication/Encryption are not enabled:

95569-image.png

PowerShell also shows RemoteUser and RemoteMachine as "Any" but I have specific user/computer groups configured in the GUI. Anyone know why the discrepancies?

Windows for business Windows Server User experience Other
0 comments No comments
{count} votes

Accepted answer
  1. Anonymous
    2021-05-17T09:22:30.637+00:00

    Hi ,

    I have the same symptom as you:

    97143-1.jpg
    97124-2.jpg

    As you said, it seems the above PowerShell results only seem to be based on how the locally configured rule is set.

    You may post this feedback in our UserVoice, UserVoice is where you can provide feedback to the Microsoft Product Groups who are now monitoring these forums.

    Here is the link:

    https://windowsserver.uservoice.com/forums/295047-general-feedback

    Best Regards,
    Candy

    --------------------------------------------------------------

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2021-05-12T05:56:42.187+00:00

    Hi ,

    Please use the following cmdlet and then check the results:

    Get-NetFirewallRule |Where-Object{$_.displayname -match "Remote Desktop - user mode \(TCP-in\)"}|Get-NetFirewallSecurityFilter  
    

    As picture below:

    95862-image.png

    When I run above cmdlet, Get-NetFirewallRule reports the match information as GUI.

    Best Regards,
    Candy

    --------------------------------------------------------------

    If the Answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.