<<< Back to Search

Create Network Shared Drive (SMB Share) ::: New-SmbShare

On this example Network Shared Drive is created granting multiple Access to specific accounts

New-SmbShare -Name "MyShare" -Path "C:\Temp\SourceFolder\" -FullAccess "MyDomain\MyUser", "BUILTIN\Administrators" -ReadAccess "BUILTIN\Users"

PS C:\>

Name                                    ScopeName                               Path                                    Description
----                                    ---------                               ----                                    -----------
MyShare                                 *                                       C:\Temp\SourceFolder

Availability by OS:

Windows 8+ / Windows Server 2012 R2

More to explore from this example

How to remove Network Shared Drive:

  • Delete Network Shared Drive (SMB Share) ::: Remove-SmbShare

New-SmbShare ::: Command reference: https://docs.microsoft.com/en-us/powershell/module/smbshare/new-smbshare