How to Share sub Folders with Specific Users in Windows

%3CLINGO-SUB%20id%3D%22lingo-sub-2414941%22%20slang%3D%22en-US%22%3EHow%20to%20Share%20sub%20Folders%20with%20Specific%20Users%20in%20Windows%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2414941%22%20slang%3D%22en-US%22%3E%3CP%3ECurrent%20i%20got%20some%20specific%20user%20need%20to%20access%20many%20of%20sub%20folder%2C%20any%20idea%20or%20easy%20way%20to%20perform%20%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2414941%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EActive%20Directory%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EStorage%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EWindows%20Server%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2418722%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20Share%20sub%20Folders%20with%20Specific%20Users%20in%20Windows%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2418722%22%20slang%3D%22en-US%22%3E%3CP%3EYou%20can%20follow%20along%20here.%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fiis%2Fweb-hosting%2Fconfiguring-servers-in-the-windows-web-platform%2Fconfiguring-share-and-ntfs-permissions%23configuring-permissions%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EShare%20and%20NTFS%20Permissions%20%7C%20Microsoft%20Docs%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

Current i got some specific user need to access many of sub folder, any idea or easy way to perform ?

2 Replies

@JohnnyHuang 

What is your goal?
Do you want to know how to share the root-folder or how to share all subfolders?
To create a share for each subfolder, you can use the following Powershell: 

 

$Roofolder = "D:\Folder"
$User = "domain\username"
$Subfolders = Get-ChildItem -Path $Roofolder
foreach($Subfolder in $Subfolders){New-SmbShare -Name $Subfolder.Name -Path $Subfolder.fullname -FullAccess $User}