raandree / NTFSSecurity

Managing permissions with PowerShell is only a bit easier than in VBS or the command line as there are no cmdlets for most day-to-day tasks like getting a permission report or adding permission to an item. PowerShell only offers Get-Acl and Set-Acl but everything in between getting and setting the ACL is missing. This module closes the gap.
MIT License
431 stars 61 forks source link

Disable truncation of output? #59

Closed Technical87 closed 5 years ago

Technical87 commented 5 years ago

Hi There,

This script is great but it truncates the output in the Powershell window and hence when I output to a file.

For example I get "ReadAndExecute, Synchro... " under access rights and "ThisFolderSubfoldersAn..." under Applies to.

How do i disable truncation on the script before it outputs?

Technical87 commented 5 years ago

As a workaround for now I managed to use out-gridview and then copy the data from there. Not ideal though as it doesn't include the headings

AspenForester commented 5 years ago

@Technical87 , How are you going about sending the output to a file? Out-File? Export-clixml? add-content? export-csv?

Technical87 commented 5 years ago

@Technical87 , How are you going about sending the output to a file? Out-File? Export-clixml? add-content? export-csv?

@AspenForester , Hey Aspen, I tried out-file and export-csv. Besides the copying and pasting element, out-gridview actually works quite well as when I paste the data into Excel it formats it quite nicely.

raandree commented 5 years ago

The NTFSSecurity module follows the practices and patterns of the PowerShell ecosystem. If there is too much text to be displayed in one column, things get truncated. There are plenty of options available to change the view to something that is more appropriate to your requirements.

As @AspenForester mentioned, Export-Csv is pretty likely what you want. Also customizing the table view (Format-Table) or switching to list view (Format-List) could help.