From 24e9290cc8b9bead863ef24398aba1a5a800ad98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Raimund=20And=C3=A9e=20=5BMSFT=5D?= Date: Thu, 11 May 2017 19:35:33 +0200 Subject: [PATCH] Fixed isse #12 and moved the file SimpleAccessCmdlets.cs to a better location. --- NTFSSecurity/NTFSSecurity.csproj | 2 +- NTFSSecurity/NTFSSecurity.psd1 | 188 +++++++++--------- .../SimpleAccessCmdlets.cs | 2 +- 3 files changed, 96 insertions(+), 96 deletions(-) rename NTFSSecurity/{ => SimpleAccessCmdlets}/SimpleAccessCmdlets.cs (99%) diff --git a/NTFSSecurity/NTFSSecurity.csproj b/NTFSSecurity/NTFSSecurity.csproj index cd4cd2f..d949182 100644 --- a/NTFSSecurity/NTFSSecurity.csproj +++ b/NTFSSecurity/NTFSSecurity.csproj @@ -145,7 +145,7 @@ PreserveNewest - + diff --git a/NTFSSecurity/NTFSSecurity.psd1 b/NTFSSecurity/NTFSSecurity.psd1 index a9c80f7..922f8a9 100644 --- a/NTFSSecurity/NTFSSecurity.psd1 +++ b/NTFSSecurity/NTFSSecurity.psd1 @@ -1,98 +1,98 @@ @{ - ModuleToProcess = 'NTFSSecurity.psm1' - - ModuleVersion = '4.2.3' - - GUID = 'cd303a6c-f405-4dcb-b1ce-fbc2c52264e9' - - Author = 'Raimund Andree' - - CompanyName = 'Raimund Andree' - - Copyright = '2015' - - Description = 'Windows PowerShell Module for managing file and folder security on NTFS volumes' - - PowerShellVersion = '2.0' - - DotNetFrameworkVersion = '3.5' - - ScriptsToProcess = @('NTFSSecurity.Init.ps1') - - TypesToProcess = @('NTFSSecurity.types.ps1xml') - - FormatsToProcess = @() - - NestedModules = @('NTFSSecurity.dll') - - AliasesToExport = '*' - - CmdletsToExport = 'Add-NTFSAccess', - 'Clear-NTFSAccess', - 'Disable-NTFSAccessInheritance', - 'Enable-NTFSAccessInheritance', - 'Get-NTFSAccess', - 'Get-NTFSEffectiveAccess', - 'Get-NTFSOrphanedAccess', - 'Get-NTFSSimpleAccess', - 'Remove-NTFSAccess', - 'Show-NTFSSimpleAccess', - #---------------------------------------------- - 'Add-NTFSAudit', - 'Clear-NTFSAudit', - 'Disable-NTFSAuditInheritance', - 'Enable-NTFSAuditInheritance', - 'Get-NTFSAudit', - 'Get-NTFSOrphanedAudit', - 'Remove-NTFSAudit', - #---------------------------------------------- - 'Disable-NTFSAccessInheritance', - 'Disable-NTFSAuditInheritance', - 'Enable-NTFSAccessInheritance', - 'Enable-NTFSAuditInheritance', - 'Get-NTFSInheritance', - 'Set-NTFSInheritance', - #---------------------------------------------- - 'Get-NTFSOwner', - 'Set-NTFSOwner', - #---------------------------------------------- - 'Get-NTFSSecurityDescriptor', - 'Set-NTFSSecurityDescriptor', - #---------------------------------------------- - 'Disable-Privileges', - 'Enable-Privileges', - 'Get-Privileges', - #---------------------------------------------- - 'Copy-Item2', - 'Get-ChildItem2', - 'Get-Item2', - 'Move-Item2', - 'Remove-Item2', - #---------------------------------------------- - 'Test-Path2', - #---------------------------------------------- - 'Get-NTFSHardLink', - 'New-NTFSHardLink', - 'New-NTFSSymbolicLink', - #---------------------------------------------- - 'Get-DiskSpace', - 'Get-FileHash2' - - ModuleList = @('NTFSSecurity.dll') - - FileList = @('NTFSSecurity.dll', 'NTFSSecurity.types.ps1xml', 'NTFSSecurity.format.ps1xml', 'NTFSSecurity.Init.ps1', 'NTFSSecurity.psm1') - - PrivateData = @{ - EnablePrivileges = $true - GetInheritedFrom = $true - GetFileSystemModeProperty = $true - ShowAccountSid = $false - IdentifyHardLinks = $true - - PSData = @{ - Tags = @('AccessControl', 'ACL', 'DirectorySecurity', 'FileSecurity', 'FileSystem', 'FileSystemSecurity', 'NTFS', 'Module', 'AccessRights') + ModuleToProcess = 'NTFSSecurity.psm1' + + ModuleVersion = '4.2.3' + + GUID = 'cd303a6c-f405-4dcb-b1ce-fbc2c52264e9' + + Author = 'Raimund Andree' + + CompanyName = 'Raimund Andree' + + Copyright = '2015' + + Description = 'Windows PowerShell Module for managing file and folder security on NTFS volumes' + + PowerShellVersion = '2.0' + + DotNetFrameworkVersion = '3.5' + + ScriptsToProcess = @('NTFSSecurity.Init.ps1') + + TypesToProcess = @('NTFSSecurity.types.ps1xml') + + FormatsToProcess = @() + + NestedModules = @('NTFSSecurity.dll') + + AliasesToExport = '*' + + CmdletsToExport = 'Add-NTFSAccess', + 'Clear-NTFSAccess', + 'Disable-NTFSAccessInheritance', + 'Enable-NTFSAccessInheritance', + 'Get-NTFSAccess', + 'Get-NTFSEffectiveAccess', + 'Get-NTFSOrphanedAccess', + 'Get-NTFSSimpleAccess', + 'Remove-NTFSAccess', + 'Show-NTFSSimpleAccess', + #---------------------------------------------- + 'Add-NTFSAudit', + 'Clear-NTFSAudit', + 'Disable-NTFSAuditInheritance', + 'Enable-NTFSAuditInheritance', + 'Get-NTFSAudit', + 'Get-NTFSOrphanedAudit', + 'Remove-NTFSAudit', + #---------------------------------------------- + 'Disable-NTFSAccessInheritance', + 'Disable-NTFSAuditInheritance', + 'Enable-NTFSAccessInheritance', + 'Enable-NTFSAuditInheritance', + 'Get-NTFSInheritance', + 'Set-NTFSInheritance', + #---------------------------------------------- + 'Get-NTFSOwner', + 'Set-NTFSOwner', + #---------------------------------------------- + 'Get-NTFSSecurityDescriptor', + 'Set-NTFSSecurityDescriptor', + #---------------------------------------------- + 'Disable-Privileges', + 'Enable-Privileges', + 'Get-Privileges', + #---------------------------------------------- + 'Copy-Item2', + 'Get-ChildItem2', + 'Get-Item2', + 'Move-Item2', + 'Remove-Item2', + #---------------------------------------------- + 'Test-Path2', + #---------------------------------------------- + 'Get-NTFSHardLink', + 'New-NTFSHardLink', + 'New-NTFSSymbolicLink', + #---------------------------------------------- + 'Get-DiskSpace', + 'Get-FileHash2' + + ModuleList = @('NTFSSecurity.dll') + + FileList = @('NTFSSecurity.dll', 'NTFSSecurity.types.ps1xml', 'NTFSSecurity.format.ps1xml', 'NTFSSecurity.Init.ps1', 'NTFSSecurity.psm1') + + PrivateData = @{ + EnablePrivileges = $true + GetInheritedFrom = $true + GetFileSystemModeProperty = $true + ShowAccountSid = $false + IdentifyHardLinks = $true + + PSData = @{ + Tags = @('AccessControl', 'ACL', 'DirectorySecurity', 'FileSecurity', 'FileSystem', 'FileSystemSecurity', 'NTFS', 'Module', 'AccessRights') LicenseUri = 'https://ntfssecurity.codeplex.com/license' ProjectUri = 'https://ntfssecurity.codeplex.com' - } - } + } + } } \ No newline at end of file diff --git a/NTFSSecurity/SimpleAccessCmdlets.cs b/NTFSSecurity/SimpleAccessCmdlets/SimpleAccessCmdlets.cs similarity index 99% rename from NTFSSecurity/SimpleAccessCmdlets.cs rename to NTFSSecurity/SimpleAccessCmdlets/SimpleAccessCmdlets.cs index aa8ac65..c6251e6 100644 --- a/NTFSSecurity/SimpleAccessCmdlets.cs +++ b/NTFSSecurity/SimpleAccessCmdlets/SimpleAccessCmdlets.cs @@ -57,7 +57,7 @@ namespace NTFSSecurity WriteVerbose(string.Format("New folder: {0}", item.FullName)); directoryList.Add(item); - var acl = FileSystemAccessRule2.GetFileSystemAccessRules(item, true, true).Select(ace => ace.ToSimpleFileSystemAccessRule2()); + var acl = FileSystemAccessRule2.GetFileSystemAccessRules(item, !ExcludeExplicit, !ExcludeInherited).Select(ace => ace.ToSimpleFileSystemAccessRule2()); try {