Output of this doesn't fit into the window
get-netFirewallRule | where { $_.Action -eq 'Block' -and $_.Enabled -eq 'True' }
read-host -prompt "Press Enter to continue..."
When i try
Remove-Item -Path ($env:userprofile + "\Desktop\enabledBlockRules_WindowsFilteringPlatform.txt")
get-netFirewallRule | where { $_.Action -eq 'Block' -and $_.Enabled -eq 'True' } | forEach {
$_ | Add-Content -Path ($env:userprofile + "\Desktop\enabledBlockRules_WindowsFilteringPlatform.txt") -Encoding "utf8"
}
read-host -prompt "Exported to desktop ."
I get nonsense results . How could i do this ?