NTFSsecurity module

Just came across the NTFSsecurity module. Its available on the PowerShell gallery or from https://github.com/raandree/NTFSSecurity.

The *-Acl cmdlets have been around since Windows PowerShell v1 but aren’t easy to use and don’t cover all our needs.

This module contains a number of cmdlets:

Add-NTFSAccess
Add-NTFSAudit
Clear-NTFSAccess
Clear-NTFSAudit
Copy-Item2
Disable-NTFSAccessInheritance
Disable-NTFSAuditInheritance
Disable-Privileges
Enable-NTFSAccessInheritance
Enable-NTFSAuditInheritance
Enable-Privileges
Get-ChildItem2
Get-DiskSpace
Get-FileHash2
Get-Item2
Get-NTFSAccess
Get-NTFSAudit
Get-NTFSEffectiveAccess
Get-NTFSHardLink
Get-NTFSInheritance
Get-NTFSOrphanedAccess
Get-NTFSOrphanedAudit
Get-NTFSOwner
Get-NTFSSecurityDescriptor
Get-NTFSSimpleAccess
Get-Privileges
Move-Item2
New-NTFSHardLink
New-NTFSSymbolicLink
Remove-Item2
Remove-NTFSAccess
Remove-NTFSAudit
Set-NTFSInheritance
Set-NTFSOwner
Set-NTFSSecurityDescriptor
Test-Path2

Some of the cmdlets appear to overlap with standard PowerShell cmdlets

Copy-Item2
Get-ChildItem2
Get-FileHash2
Get-Item2
Move-Item2
Remove-Item2
Test-Path2

which needs further investigation.

PS> get-command Test-Path -Syntax

Test-Path [-Path] <string[]> [-Filter <string>] [-Include <string[]>]
[-Exclude <string[]>] [-PathType <TestPathType>] [-IsValid]
[-Credential <pscredential>] [-UseTransaction] [-OlderThan <datetime>]
[-NewerThan <datetime>] [<CommonParameters>]

Test-Path -LiteralPath <string[]> [-Filter <string>] [-Include <string[]>]
[-Exclude <string[]>] [-PathType <TestPathType>] [-IsValid]
[-Credential <pscredential>] [-UseTransaction] [-OlderThan <datetime>]
[-NewerThan <datetime>] [<CommonParameters>]

PS> get-command Test-Path2 -Syntax

Test-Path2 [-Path] <string[]> [-PathType <TestPathType>] [<CommonParameters>]

There isn’t a complete set of help files for the module at the moment but some documentation is available through the github repository.

This is a Windows PowerShell only module at the moment as it requires System.Windows.Forms but may work on PowerShell core through the Windows compatibility module.

This entry was posted in PowerShell v5, Security. Bookmark the permalink.

2 Responses to NTFSsecurity module

  1. Spad says:

    The “2” cmdlets are designed to work with long file paths where the classic cmdlets fall (or fell) over. The naming is bad but the functionality is useful.

  2. Luke says:

    A really great module. I use it since a long time.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s