Run in admin PowerShell:
# List of executable file names $exeFiles = @( "QBW.exe", "qbdbmgrn.exe", "QBDBMgrN.exe", "dbmanagerexe.exe", "filemanagement.exe", "QBCFMonitorService.exe" ) # Root folder to search $rootPath = "C:\Program Files\Intuit" foreach ($exeName in $exeFiles) { # Search for the file in all subdirectories $foundPaths = Get-ChildItem -Path $rootPath -Recurse -Filter $exeName -File -ErrorAction SilentlyContinue if ($foundPaths.Count -eq 0) { Write-Warning "Could not find $exeName under $rootPath" continue } foreach ($file in $foundPaths) { $ruleName = "Allow Inbound - $exeName - $($file.Directory.Name)" # Check for existing rule with same name $existingRule = Get-NetFirewallRule -DisplayName $ruleName -ErrorAction SilentlyContinue if (-not $existingRule) { New-NetFirewallRule ` -DisplayName $ruleName ` -Direction Inbound ` -Program $file.FullName ` -Action Allow ` -Profile Any ` -Enabled True ` -Protocol TCP Write-Output "Firewall rule created: $ruleName" } else { Write-Output "Rule already exists: $ruleName" } } }
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article