# Enable Network Discovery In Windows 10 Without Using the netsh Command In PowerShell

### #Enable Network Discovery In Windows 10 Without Using the netsh Command In PowerShell

#It is as simple as enabling  the pre-configured rule in Windows Firewall to enable Network Discovery in Windows 10 but using `netsh` is the old fashion way.

#### #Run just this one command in an elevated PowerShell prompt to enable Network Discovery

`Get-NetFirewallRule -DisplayGroup 'Network Discovery'|Set-NetFirewallRule -Profile 'Private, Domain' -Enabled true -PassThru|select Name,DisplayName,Enabled,Profile|ft -a`

### #The Longer Story…

#Enabling the Network Discovery services it what makes the Network icon (formally My Network Places) work properly. These commands all work in both PowerShell and PowerShell Direct.

#### #Get Firewall rules for Network Discovery

#This command shows the individual rules and the network connection profiles that  are explicitly enabled and disabled for `Network Discovery`.

`Get-NetFirewallRule -DisplayGroup 'Network Discovery'|select Name,DisplayName,Enabled,Profile|ft -a`

#### #Enable Network Discovery for Private and Domain network profiles

#Enable the Network Discovery service for the `Private` and `Domain` network profiles by applying the preconfigured Windows Firewall group rule called `Network Discovery` by typing this:

`Get-NetFirewallRule -DisplayGroup 'Network Discovery'|Set-NetFirewallRule -Profile 'Private, Domain' -Enabled true -PassThru|select Name,DisplayName,Enabled,Profile|ft -a`

#▲It will look like that in the GUI setup when `Network Discovery` is enabled.

#### #Set Network Connection Profile to `Private``.`

`Set-NetConnectionProfile -NetworkCategory Private -PassThru`

#### #Disable Network Discovery for all network profiles

#Run this command to disable `Network Discovery` on all network profiles if you do not wish to keep the service available.

`Get-NetFirewallRule -DisplayGroup 'Network Discovery'|Set-NetFirewallRule -Enabled false -PassThru|select Name,DisplayName,Enabled,Profile|ft -a`

#▲It will look like that in the GUI setup when `Network Discovery` is disabled.