< Back

Get-ForensicFileSlack

Sat Jan 18, 2020 8:50 pm

NAME Get-ForensicFileSlack



SYNOPSIS

Gets the specified volume's slack space.





SYNTAX

Get-ForensicFileSlack [[-Index] <Int32>] [-VolumeName <String>] [<CommonParameters>]



Get-ForensicFileSlack [-Path] <String> [<CommonParameters>]





DESCRIPTION

The Get-ForensicFileSlack cmdlet gets the specified volume's slack space as a byte array.



"Slack space" is the difference between the true size of a file's contents and the allocated size of a file on

disk.



When NTFS stores data in a file, the data must be allocated in cluster-sized chunks (commonly 4096 bytes), which

creates slack space.



Except as noted, the cmdlets in the PowerForensics module require the permissions of a member of the

Administrators group on the computer. To run them, start Windows PowerShell with the 'Run as administrator' option.





PARAMETERS

-VolumeName [<String>]

Specifies the name of the volume or logical partition.



Enter the volume name in one of the following formats: \\\\.\\C:, C:, or C.



Required? false

Position? named

Default value \\\\.\\C:

Accept pipeline input? false

Accept wildcard characters? false



-Index [<Int32>]

The index number of the file to return slack space for.



Required? false

Position? 0

Default value

Accept pipeline input? false

Accept wildcard characters? false



-Path <String>

The path of the file to return slack space for.



Required? true

Position? 0

Default value

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

System.String













OUTPUTS

System.Byte[]













-------------------------- EXAMPLE 1 --------------------------



[ADMIN]: PS C:\\>Get-ForensicFileSlack -VolumeName \\\\.\\C: -Index 0



This command uses Get-ForensicFileSlack to get the slack space from the file that is MFT record index 0 on the C:\\

logical volume.

-------------------------- EXAMPLE 2 --------------------------



[ADMIN]: PS C:\\>Get-ForensicFileSlack -Path C:\\windows\\notepad.exe



This command uses Get-ForensicFileSlack to return the slack space for Notepad.exe.



RELATED LINKS