Create ShareFolder
cd /d <drive letter>:
cd /d Y:
mkdir ShareFolder
Create the Security Group in the OU
New-ADGroup `
-Name "groupAshareFolder" `
-SamAccountName "groupAshareFolder" `
-GroupCategory Security `
-GroupScope Global `
-Path "OU=team,DC=server,DC=kh"
DC=server is serverName
-Path "<OU or Domain Path>"
Add Users to the Group
Add-ADGroupMember -Identity "groupAshareFolder" -Members "user"
Add-ADGroupMember -Identity "groupAshareFolder" -Members "<user use with client>"
Create the SMB Share
New-SmbShare `
-Name "ShareFolder" `
-Path "Y:\ShareFolder" `
-ReadAccess "groupAshareFolder"
-Path "<drive letter>:\ShareFolder"
-ReadAccess → grants read‑only permissions.
-ChangeAccess → grants read + write permissions.
-FullAccess → grants full control.
Remove SMB Share (ShareFolder)
Remove-SmbShare -Name "test" -Force
New-SmbShare -Name "test" -Path "E:\test" -ChangeAccess "groupAshareFolder" -FullAccess "Administrator"Verify Permissions
Get-SmbShareAccess -Name "ShareFolder"
(Client) Access Share Folder With UNC Path
\\<servername>\ShareFolder
\\server\ShareFolder
(Client) Map the Share Folder to a specific Drive Letter
net use Z: \\server\ShareFolder /persistent:yes