[Community] Get-FirewallRule could not find servicename "Windows Firewall"

Issue #208 resolved
Stephan Dosenbach
created an issue

Used: Get-FirewallRule (Carbon 2.2.0)

Error: translated: "There could not find a service with servicename "Windows Filewall" + CategoryInfo : ObjectNotFound: (Windows Firewall:) [], CimException + FullyQualifiedErrorId : NoServiceFoundForGivenName,Microsoft.PowerShell.Commands.GetServiceCommand

Environment: PSVersion 5.0.10586.117 OS: Microsoft Windows Server 2012 R2 Standard - Testversion OS Build: 6.3.9600 Nicht zutreffend Build 9600

Servicedetails: Get-Service | where { $_.DisplayName -like 'Firewall' } Status Name DisplayName
------ ---- -----------
Running MpsSvc Windows-Firewall

Thanks a lot

Comments (8)

  1. Aaron Jensen repo owner

    Can you show me the actual command you ran? Get-FirewallRule gets firewall rules, but your title mentions "servicename". Did you paste the wrong error? It looks like you were looking for a service named "Windows Firewall" but the service's name is actually "Windows-Firewall". Please help me reproduce this error.

  2. Stephan Dosenbach reporter

    Actual Command: I have wrote <star> around "SQL" to show that there is a wildcard

    ... Import-DscResource -ModuleName Carbon -ModuleVersion "2.2.0" ... Script FirewallProtocol { SetScript = { try { ... Get-FirewallRule -Name "<star>SQL<star>" -Verbose:$FALSE | Format-Table -AutoSize | Out-File -FilePath $InfoFile -Force } catch { ... } } ... } ...

    Error Info: Maybe this is only a problem on Windows Server running a german language. On english versions there is no Problem

    Thanks a lot

  3. Log in to comment