Home VoIP Softphone Firewall Script
Post
Cancel

VoIP Softphone Firewall Script

VoIP Softphone Firewall Script

Script to automatically create an inbound firewall rule for a specified application

softphone-firewall.ps1

1
2
3
4
5
6
7
$profiles = Get-ChildItem -Path 'C:\Users' -Directory
Foreach ($profile in $profiles) {
    $ExePath = Join-Path -Path $profile.Fullname -ChildPath 'appdata\local\bt\softphoneapp\softphone.exe'
    if (!(Get-NetFirewallApplicationFilter -Program $ExePath)) {
        New-NetFirewallRule -Displayname "softphone.exe" -Direction Inbound -Program $ExePath
    }
}
This post is licensed under CC BY 4.0 by the author.