Share via


Automate Advanced Sharing Settings in Windows 10

Question

Tuesday, January 30, 2018 8:42 AM

Hi,

I would like to understand how the following settings in Windows 10 can be set via command line, registry or powershell?

Control Panel\Network and Internet\Network and Sharing Center\Change advanced sharing settings :

Network Discovery
File and Printer Sharing
HomeGroup Connections

for Private, Guest and Public and Domain.

Public Folder Sharing
Media Streaming
File Sharing Connections 

for All Networks.

Appreciate your help!

Thanks.

All replies (4)

Wednesday, January 31, 2018 2:21 AM

Hi,

The command line like the following type.

netsh advfirewall firewall set rule group="Network Discovery" new enable=Yes

netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes

……

And so on.

Best Regards,

Tao

Please remember to mark the replies as answers if they help. If you have feedback for TechNet Subscriber Support, contact [email protected].


Wednesday, January 31, 2018 11:58 AM

Thanks for the reply.

The mentioned commands are for Network discovery and File printer sharing, what are the commands for rest of the options like HomeGroup Connections, Public Folder Sharing, Media Streaming and File Sharing Connections?


Monday, February 5, 2018 7:21 AM

Hi,

We haven’t heard from you for a couple of days, have you solved the problem? 

Please remember to mark the replies as answers if they help. If you have feedback for TechNet Subscriber Support, contact [email protected].


Thursday, August 16, 2018 3:12 PM

Hi,

I know it has been a while, but I think the OP was waiting on you to provide the rest of the commands.

This is of interest to me as well, so I'll elaborate on the question:

  1. How can we specify that a Rule Group (Network Discovery, etc.) is being modified for a particular network type (Private vs Guest/Public)?  Or does it apply to the current profile only? Or does it set both network types to the same value?
  2. Are we to assume that the first option is always "now enable=YES", and the 2nd option would always be "now enable=NO"?  If not, can you please provide the specific values for each option?
  3. What is the command to turn on/off Media Streaming? 

Any and all information you can provide, or direction to the appropriate Knowledge Base article would be very helpful.  Thanks!