New-SmbShare (PowerShell reference) — by Microsoft Learn
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
- New-SmbShare -Name "Data" -Path "J:\Data" -EncryptData $True
- 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.
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