0

I got the current script (from this answer).

This is the script: `


        Get-NetFirewallRule -Action Allow -Enabled True -Direction Inbound | 
      Where-Object { 
        $portFilter = $PSItem | Get-NetFirewallPortFilter | Select-Object -Unique
        $portFilter.LocalPort -match '^(80|135|139|445|5985|5986)$' -or 
          ($portFilter.LocalPort -ge 49152 -and $portFilter.LocalPort -le 65535)} |
          Format-Table Name,Profile,
    Enabled,
    Direction,
    Action,
    @{Name='Protocol';Expression={($PSItem | Get-NetFirewallPortFilter).Protocol}},
    @{ Name='LocalPort'; Expression={$portFilter.LocalPort | Select-Object -Unique}},
    @{Name='RemotePort';Expression={($PSItem | Get-NetFirewallPortFilter).RemotePort}}
`

How can I implement the current script in AsBuiltReport framework? Is there an easy way to show the result in a report?

I will trigger the script remotely to multiple hosts.

Thanks

  • You have a powershell table in code below. AsBuiltConfiguration will accept text input which is the format inside powershell. See : https://www.asbuiltreport.com/user-guide/new-asbuiltreport/#format – jdweng Nov 13 '22 at 10:34

0 Answers0