.. / Get-ChildItem

Gets the files and folders in a file system drive.


Functions:
Type:
Toolsets:

Resources

Data

Enumerate network share

Get-ChildItem -LiteralPath '\\?\UNC\FS1.ad.bitsadmin.com\IT' -Depth 25 -Force | ForEach-Object { [PSCustomObject]@{Name=$_.Name; Mode=$_.Mode; Length=$_.Length; LastWriteTime=$_.LastWriteTime.ToUniversalTime().ToString('yyyy-MM-dd HH:mm:ss'); FullName=$_.FullName.Replace('\?\UNC','') } } | Export-Csv -Encoding UTF8 -NoTypeInformation FS1_IT.csv
Usecase
Create file listing of network share to identify files that can be used for escalation

Comments
PowerShell Module: Microsoft.PowerShell.Management

Mitre Att&ck
T1083




Updated: 2023-08-25
Contributor: Arris Huijgen (bitsadmin)