Files
Intune/intune/Externally Sourced Remediations/Reporting/Get-FirewallStatusReport/Detect-FirewallStatusReport.ps1
2025-05-19 15:19:36 -04:00

13 lines
392 B
PowerShell

# Check Windows Firewall status
$firewallStatus = Get-NetFirewallProfile | Select-Object Name, Enabled, DefaultInboundAction, DefaultOutboundAction
# Output the Firewall status
# Write-Output $firewallStatus
$csvPath = "C:\temp\FirewallProfileStatus.csv"
$firewallStatus | Export-Csv -Path $csvPath -NoTypeInformation
Write-Output "Firewall Profile status exported to $csvPath"
Exit 0