Solved

How to advance search in Windows using PS

Posted on 2016-09-24
4
22 Views
Last Modified: 2016-09-24
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
Comment
Question by:rayluvs
  • 2
  • 2
4 Comments
 
LVL 49

Expert Comment

by:Akhater
Comment Utility
Get-ChildItem c:\ -force -recurse

Full info https://technet.microsoft.com/en-us/library/ee692796.aspx
0
 

Author Comment

by:rayluvs
Comment Utility
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
 
LVL 49

Accepted Solution

by:
Akhater earned 500 total points
Comment Utility
Get-ChildItem -Include "*.rar","*.txt"  -Recurse -force
0
 

Author Closing Comment

by:rayluvs
Comment Utility
Thanx!
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Why would I want to create a function for tracking messages? I am glad you asked. As with most monotonous/routine tasks, human error tends to creep in after doing the same task over and over again. By creating a function, you load the function once…
I thought I'd write this up for anyone who has a request to create an anonymous whistle-blower-type submission form created using SharePoint 2010 (this would probably work the same for 2013). It's not 100% fool-proof but it's as close as you can get…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now