
To create an encrypted shared folder, you can use -Encrypted parameter.

The above example will provide Change Access to a Beta AD user and Full Access to a Delta AD user. To provide multiple permissions, New-SmbShare -Name "Shared Folder" -Path "E:\DSC\" -ChangeAccess "Automationlab\Beta" -FullAccess "AutomationLab\Delta"

Similarly, for only read-only permission we can use the -Readonly parameter.įor Change and Read permission use -ChangeAccess Parameter. For example, New-SmbShare -Name "Shared Folder" -Path "E:\DSC\" -FullAccess "automationlab\delta","Automationlab\Beta"įull access will be provided to Delta and Beta users of the domain AutomationLab. To assign the Full Access permission to the specific user, we can use the -FullAccess parameter followed by active directory username to provide the full access. The below command will simply share folder New-SmbShare -Path E:\DSC\ -Name "Shared Folder"ĭSC folder will be shared with a “ Shared Folder” name with everyone’s Read Permission by default because we haven’t specified the scope yet. In this example, we have a folder called “ DSC” and we want to share.

This command is a part of the module SmbShare. You can use the Get-EXOMailboxFolderPermission cmdlet instead of Get-MailboxFolderPermission to view the permissions of mailbox items in the Exchange Online PowerShell V2 module. To share a windows folder using PowerShell, we can use the New-SmbShare command.
