Skip to content

Instantly share code, notes, and snippets.

@aaronparker
Created July 26, 2017 10:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaronparker/5bfc99ed4f5f932fcd59413a465388f6 to your computer and use it in GitHub Desktop.
Save aaronparker/5bfc99ed4f5f932fcd59413a465388f6 to your computer and use it in GitHub Desktop.
Create Secure Shared Folders
@ECHO OFF
REM Creating secure shared folders
REM Sample articles:
REM https://support.microsoft.com/en-us/help/274443/how-to-dynamically-create-security-enhanced-redirected-folders-by-using-folder-redirection-in-windows-2000-and-in-windows-server-2003
REM https://technet.microsoft.com/en-us/library/jj649078(v=ws.11).aspx
REM Create and share folders with permissions for FSLogix Profile Containers or Office 365 Containers
md e:\FSLogixContainers
net share FSLogixContainers=e:\FSLogixContainers /GRANT:Users,CHANGE /GRANT:Administrators,FULL /CACHE:None /REMARK:"FSLogix Containers"
icacls e:\FSLogixContainers /inheritance:d
icacls e:\FSLogixContainers /remove Users
icacls e:\FSLogixContainers /grant Users:(S,RD,AD,X,RA)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment