Skip to content

New-SmbShare (PowerShell reference) — by Microsoft Learn

intermediatepageLink only (©)

Reference for the cmdlet that publishes a folder as an SMB file share on Windows Server, including examples that grant full or change access to specific accounts and create an encrypted share. Useful for scripting a file server instead of clicking through the share wizard.

Quick steps

  1. New-SmbShare -Name "Data" -Path "J:\Data" -EncryptData $True
  2. Use -FullAccess, -ChangeAccess or -ReadAccess to set share permissions

Paraphrased from the source. Menus can differ by version, so check the original for full details.

Read the full article on learn.microsoft.com

Source: New-SmbShare (PowerShell reference) by Microsoft Learn. Licence: Link only (©).

Source reviewed
2026-11-02
Link checked
2026-11-02
Tested hands-on
Not by Oddbyte.Me

smbfile serverpowershellwindows server

More in Server Basics