cNtfsAccessControl DSC Resource


I’ve been using this module to set permissions on a set of folders that I need to create and it all works well.

My question is, if I add a permission outside of DSC, how can I make sure that DSC will remove that permission when I re-apply the configuration?


`# Setup Permissions</div> cNtfsPermissionEntry 'datashare0' {</div> Ensure = 'Present'</div> DependsOn = "[File]MainDirectory"</div> Principal = 'Authenticated Users'</div> Path = 'C:\MainData'</div> AccessControlInformation = @(</div> cNtfsAccessControlInformation</div> AccessControlType = 'Allow'</div> FileSystemRights = 'Read'</div> Inheritance = 'ThisFolderSubfoldersAndFiles'</div> NoPropagateInherit = $false</div> }`

Set your configuration mode to ApplyAndAutoCorrect, it will check the consistency based on the ConfigurationModeFrequencyMins set.

btwn: You can format you code reading the instructions in the pinned page of the forums


Thanks, I’ll try that tonight.