Windows
  • Introduction
  • General
    • Users
    • SAM database
  • Filesystem
    • NTFS
    • Finding files
  • Services
    • sc
  • Registry
    • reg
  • Registry Editor (GUI)
  • Access control & Permissions
    • icacls
  • User Account Control (UAC)
  • Powershell
    • Get-ChildItem
    • whoami
  • 🔍Active Directory (AD)
    • Domain Controller (DC)
    • Domain Service (AD DS)
      • Security groups
      • Organizational Units (OUs)
      • Security groups vs OUs
    • Authentication methods
      • Kerberos
      • NetNTLM
Powered by GitBook
On this page
  1. Powershell

Get-ChildItem

Basic command:

Get-ChildItem -Path "path_to_search"

Filter files with name:

PS> Get-ChildItem -Path "path_to_search" -Recurse -Filter "*string*" | Select-Object FullName

# Eg. search in the C:\ directory, for the filename that contains TEST
PS> Get-ChildItem -Path C:\ -Recurse -Filter "*TEST*" | Select-Object FullName

Reveal hidden files using the -force flag (eg. system files):

Get-ChildItem -Path "path_to_search" -Recurse -Force -ErrorAction SilentlyContinue

# Eg.
Get-ChildItem -Path "C:\Users\user\AppData\Local\Microsoft\Windows\INetCache\IE" -Recurse -Force -ErrorAction SilentlyContinue
PreviousUser Account Control (UAC)Nextwhoami

Last updated 6 days ago