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
Last updated