• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 41
  • Last Modified:

How to advance search in Windows using PS

What Is the command to search multiple files, hidden and subfolders using Windows PowerShell command prompt?
(this is for Windows 8 and Windows  10)
0
rayluvs
Asked:
rayluvs
  • 2
  • 2
1 Solution
 
AkhaterCommented:
Get-ChildItem c:\ -force -recurse

Full info https://technet.microsoft.com/en-us/library/ee692796.aspx
0
 
rayluvsAuthor Commented:
Can't seem to get to display multiple folders.

For example, in command prompt if we type:

dir *.rar *.txt

It display either all that have RAR or TXT extensions; both or one or non.

Yet in PS,

Get-ChildItem  *.rar *.txt -recurse -force

no results.
0
 
AkhaterCommented:
Get-ChildItem -Include "*.rar","*.txt"  -Recurse -force
0
 
rayluvsAuthor Commented:
Thanx!
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now