2

I have a few servers where I see a blue question mark on the sql server service, as per the picture below.

enter image description here

This is the solution:

Enabling these Windows Firewall rules did the trick for me

Windows Management Instrumentation (WMI-In)

Windows Management Instrumentation (DCOM-In)

Is there a way I could achieve this via powershell?

Marcello Miorelli
  • 16,170
  • 52
  • 163
  • 300

1 Answers1

7

You would use the Enable-NetFirewallRule cmdlet:

Enable-NetFirewallRule -Name "WMI-WINMGMT-In-TCP", "WMI-RPCSS-In-TCP"

In order to find the relevant rule names (in order to enable it), you can search existing firewall rules by name by using the Get-NetFirewallRule cmdlet, for example:

Get-NetFirewallRule -Name "*WMI*"

This uses wildcards to final all the rules that contain "WMI" as an example.

Josh Darnell
  • 29,228
  • 5
  • 65
  • 120
  • Small note, you can shortcut the command by providing both names together. So Enable-NetFirewallRule -Name 'WMI-WINMGMT-In-TCP','WMI-RPCSS-In-TCP' would have the same effect. –  Dec 31 '18 at 16:56
  • @ShawnMelton Thanks! I don't use PowerShell super often these days, and always forget exactly what syntax to use for passing lists like that. So I just default to multiple commands =) I've updated the answer. – Josh Darnell Dec 31 '18 at 17:08
  • Oh, it works either way. Some prefer to use multiple for readability when they are just glancing....as long as it gets the job done. –  Jan 01 '19 at 18:01