atoato
Goto Top

Win7 firewall list von

hallo
in Win7 kann ich mit dem Befehl

netsh advfirewall firewall show rule status=enabled name=all

zeige alle Rules, die aktiv sind
wie kann ich alle auflisten, die den Status „Block“ haben?
danke
t

Content-ID: 307636

Url: https://administrator.de/contentid/307636

Ausgedruckt am: 26.11.2024 um 14:11 Uhr

129813
129813 19.06.2016 aktualisiert um 11:45:41 Uhr
Goto Top
Hi.
you should definitly use powershell for this
Get-NetFirewallRule -Action Block
The netsh > advfirewall context is deprecated and will be removed from the next versions of Windows. So hurry up and use modern scripting languages.

Regards
AtoAto
AtoAto 19.06.2016 um 11:00:06 Uhr
Goto Top
thx but im running win7 on and:

The term 'Get-NetFirewallRule' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was...

br
129813
129813 19.06.2016 aktualisiert um 11:46:02 Uhr
Goto Top
This cmdlet is only supported on win8.x and above.

In win7 you could pipe the content to findstr and search for the term 'Block' to filter out the rules you want.
129813
129813 19.06.2016 aktualisiert um 11:31:36 Uhr
Goto Top
You could also use netsh within Powershell to filter out the rules like this.
I have put in the german translation for analysing the output.
((netsh advfirewall firewall show rule name=all status=enabled) | out-string ) -split '(?=Regelname)' | ?{$_ -match 'Aktion:\s+Blockieren'}  
AtoAto
AtoAto 19.06.2016 um 11:37:31 Uhr
Goto Top
awesome, it works

((netsh advfirewall firewall show rule name=all status=enabled) | out-string ) -split 'Rule Name' | ?{$_ -match 'Action:\s+Block'} >c:\Block_Rule.txt

thx
br
129813
129813 19.06.2016 aktualisiert um 11:41:41 Uhr
Goto Top
And i extra did the translation for nothing, ohh no face-smile
Have a nice sunday.

highload
AtoAto
AtoAto 19.06.2016 um 12:00:44 Uhr
Goto Top
you dont have to worry at all, ;)
have a great weekend too