Enabling File Sharing on Windows Server 2012 Core and Hyper-V 2012

One new/old thing about File and Printer Sharing.

If you have Windows server 2012 Core or Hyper-V 2012 server you can face problems where you want to open admin shares on server. If you type \\servername\c$ you will receive error message that you can’t reach this share.

This is because File and Printer sharing is disabled by default in Windows Server 2012 and in Hyper-V 2012. To enable File and Printer Sharing in command prompt you must type:

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

After this you will be able to reach admin shares on Windows Server 2012 Core and Hyper-V 2012.

This is applicable also to Windows Server 2012 with GUI.

About these ads

8 thoughts on “Enabling File Sharing on Windows Server 2012 Core and Hyper-V 2012

  1. One thing I found when copying this rule, you need to copy/paste it in the command prompt, then move the cursor to the quotes, delete them and retype the quotations. Then it applies.

  2. I also found that with mine I had issues until I did the following:

    dism /online /enable-feature /featurename=FileServices

    • the actual command is:
      dism /online /enable-feature /featurename=File-Services
      you can get features names by typing : dism /online /get-features

  3. I was trying to remember the exact netsh command line and came across your blog.

    You can also do this in powershell 3:
    get-netfirewallrule -displaygroup ‘File and Printer Sharing’ | enable-netfirewallrule

    The drawback to both of these methods is that they enable the rule group for all firewall profiles. In Powershell, use the following command to assign the rules to Domain profile:
    set-netfirewallrule -displaygroup ‘File and Printer Sharing’ -profile Domain -enabled true

    Now the other profiles will block implicitly because there are no rules assigned to them.

    Shameless plug: I just finished a blog on the subject discussing various ways to enable File sharing. http://openatacostand.blogspot.com/2013/05/curiousity-killed-cat-enablingdisabling.html

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s