Home / Server / Windows Server / How to Manage Shared Folders on Windows Server

How to Manage Shared Folders on Windows Server

Windows Server’s shared folder features let multiple users access files over the network. Knowing how to create shares, check who has files open, and manage permissions is fundamental for anyone administering a file server. Here is how to work with shared folders on Windows Server.

Create a Shared Folder via File Explorer

  1. Right-click the folder you want to share → Properties → Sharing tab
  2. Click Advanced Sharing
  3. Tick Share this folder
  4. Set the Share name (the name users will see on the network — can differ from the folder name). Append a $ to make it a hidden share (e.g. Admin$) that does not show up when browsing \\servername.
  5. Click Permissions to set share-level permissions. For most setups, grant Full Control to Everyone at the share level and control access via NTFS permissions on the folder itself — this is simpler to manage.
  6. Click OK

Create a Shared Folder via PowerShell

# Create a share
New-SmbShare -Name "Finance" -Path "D:\Shares\Finance" -Description "Finance department files"

# Share with specific permissions
New-SmbShare -Name "Finance" -Path "D:\Shares\Finance" `
    -FullAccess "CONTOSO\Finance-Admins" `
    -ChangeAccess "CONTOSO\Finance-Users" `
    -ReadAccess "CONTOSO\Management"

# Create a hidden share
New-SmbShare -Name "Finance$" -Path "D:\Shares\Finance"

List All Shared Folders on the Server

# PowerShell
Get-SmbShare | Select-Object Name, Path, Description

# Command Prompt
net share

This includes built-in administrative shares (C$, ADMIN$, IPC$) as well as any custom shares you have created.

Check Who Has Files Open (Open Sessions and Files)

Before restarting a server or taking a share offline, check who has files open:

# See who is connected to shares on this server
Get-SmbSession | Select-Object ClientUserName, ClientComputerName, NumOpens, SecondsIdle

# See which files are currently open
Get-SmbOpenFile | Select-Object ClientUserName, ClientComputerName, Path

Via Computer Management: expand Shared Folders → Sessions (active connections) and Open Files (files currently in use). You can close files or disconnect sessions from here if needed — right-click → Close Open File or Disconnect Session. Be aware that forcibly closing an open file may cause the user to lose unsaved work.

Manage NTFS Permissions on a Shared Folder

Share permissions and NTFS permissions work together — the effective access is the more restrictive of the two. Best practice is to set share permissions to Full Control for Authenticated Users, then control access entirely through NTFS permissions:

  1. Right-click the folder → Properties → Security tab
  2. Click Edit to modify permissions, or Advanced for inheritance and detailed control
  3. Add or remove users and groups, setting Read, Write, Modify, or Full Control as appropriate
# Set NTFS permissions via PowerShell
$acl = Get-Acl "D:\Shares\Finance"
$rule = New-Object System.Security.AccessControl.FileSystemAccessRule("CONTOSO\Finance-Users", "Modify", "ContainerInherit,ObjectInherit", "None", "Allow")
$acl.SetAccessRule($rule)
Set-Acl -Path "D:\Shares\Finance" -AclObject $acl

Send a Message Before Disconnecting Users

If you need to take a share offline or restart the server:

# Send a message to all connected sessions
msg * "The file server will restart in 15 minutes. Please save and close all open files."

DFS — Distributed File System

If your organisation has multiple file servers or needs resilient file shares, consider the DFS (Distributed File System) role. DFS Namespaces allow you to present a unified \\domain\share path that routes to the appropriate server, making it transparent to users when you move shares between servers. Install it via Server Manager → File and Storage Services → DFS Namespaces.

Sign Up For Daily Newsletter

Stay updated with our weekly newsletter. Subscribe now to never miss an update!

[mc4wp_form]

Leave a Reply

Your email address will not be published. Required fields are marked *