Просмотр исходного кода

Fixed isse #12 and moved the file SimpleAccessCmdlets.cs to a better location.

tags/4.2.4
Raimund Andée [MSFT] 7 лет назад
Родитель
Сommit
24e9290cc8
3 измененных файлов: 96 добавлений и 96 удалений
  1. +1
    -1
      NTFSSecurity/NTFSSecurity.csproj
  2. +94
    -94
      NTFSSecurity/NTFSSecurity.psd1
  3. +1
    -1
      NTFSSecurity/SimpleAccessCmdlets/SimpleAccessCmdlets.cs

+ 1
- 1
NTFSSecurity/NTFSSecurity.csproj Просмотреть файл

@@ -145,7 +145,7 @@
<None Include="NTFSSecurity.types.ps1xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<Compile Include="SimpleAccessCmdlets.cs" />
<Compile Include="SimpleAccessCmdlets\SimpleAccessCmdlets.cs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="ShowSimpleEffectiveAccess.resx">


+ 94
- 94
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'
}
}
}
}
}

NTFSSecurity/SimpleAccessCmdlets.cs → 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
{

Загрузка…
Отмена
Сохранить