PowerShell Logo Small

New-SmbShare



This is the built-in help made by Microsoft for the command 'New-SmbShare', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Creates a new Server Message Block (SMB) share.

SYNTAX


New-SmbShare [-Name] <String> [-Path] <String> [[-ScopeName] <String>] [-AsJob] [-CachingMode <CachingMode>] [-CATimeout <UInt32>] [-ChangeAccess <String[]>] [-CimSession
<CimSession[]>] [-ConcurrentUserLimit <UInt32>] [-ContinuouslyAvailable <Boolean>] [-Description <String>] [-EncryptData <Boolean>] [-FolderEnumerationMode
<FolderEnumerationMode>] [-FullAccess <String[]>] [-NoAccess <String[]>] [-ReadAccess <String[]>] [-Temporary] [-ThrottleLimit <Int32>] [-Confirm] [-WhatIf]
[<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The New-SMBShare cmdlet exposes a file system folder to remote clients as a new Server Message Block (SMB) share.


To delete a share that was created by this cmdlet, use the Remove-SMBShare cmdlet.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/?LinkId=289547
Get-SmbShare
Remove-SmbShare
Set-SmbShare

REMARKS

<

Examples


EXAMPLE 1

PS C:\>New-SmbShare –Name VMSFiles –Path C:\ClusterStorage\Volume1\VMFiles -FullAccess Contoso\Administrator, Contoso\Contoso-HV1$
Name ScopeName Path Description
---- --------- ---- -----------
VMSFiles Contoso-SO C:\ClusterStorage\Volume1\...



This example creates a new SMB share.




EXAMPLE 2

PS C:\>New-SmbShare -Name Data -Path J:\Data -EncryptData $true
Name ScopeName Path Description
---- --------- ---- -----------
Data Contoso-FS J:\Data



This example creates a new encrypted SMB share.