Created
August 24, 2018 01:45
-
-
Save jfrantz1-r7/225210514b638dbda477003e37811e6a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
md c:\Transcripts | |
## Kill all inherited permissions | |
$acl = Get-Acl c:\Transcripts | |
$acl.SetAccessRuleProtection($true, $false) | |
## Grant Administrators full control | |
$administrators = [System.Security.Principal.NTAccount] “Administrators” | |
$permission = $administrators,“FullControl”,“ObjectInherit,ContainerInherit”,“None”,“Allow” | |
$accessRule = New-Object System.Security.AccessControl.FileSystemAccessRule $permission | |
$acl.AddAccessRule($accessRule) | |
## Grant everyone else Write and ReadAttributes. This prevents users from listing | |
## transcripts from other machines on the domain. | |
$everyone = [System.Security.Principal.NTAccount] “Everyone” | |
$permission = $everyone,“Write,ReadAttributes”,“ObjectInherit,ContainerInherit”,“None”,“Allow” | |
$accessRule = New-Object System.Security.AccessControl.FileSystemAccessRule $permission | |
$acl.AddAccessRule($accessRule) | |
## Deny “Creator Owner” everything. This prevents users from | |
## viewing the content of previously written files. | |
$creatorOwner = [System.Security.Principal.NTAccount] “Creator Owner” | |
$permission = $creatorOwner,“FullControl”,“ObjectInherit,ContainerInherit”,“InheritOnly”,“Deny” | |
$accessRule = New-Object System.Security.AccessControl.FileSystemAccessRule $permission | |
$acl.AddAccessRule($accessRule) | |
## Set the ACL | |
$acl | Set-Acl c:\Transcripts\ | |
## Create the SMB Share, granting Everyone the right to read and write files. Specific | |
## actions will actually be enforced by the ACL on the file folder. | |
New-SmbShare -Name Transcripts -Path c:\Transcripts -ChangeAccess Everyone |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I try this the client creates the date child directory under transcripts but is never able to create the transcription file. If I configure the GPO to use a local folder it works without issues.