Solved

How to advance search in Windows using PS

Posted on 2016-09-24
4
30 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 49

Expert Comment

by:Akhater
ID: 41813763
Get-ChildItem c:\ -force -recurse

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

Author Comment

by:rayluvs
ID: 41813775
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
ID: 41813794
Get-ChildItem -Include "*.rar","*.txt"  -Recurse -force
0
 

Author Closing Comment

by:rayluvs
ID: 41814065
Thanx!
0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Create and license users in Office 365 in bulk based on a CSV file. A step-by-step guide with PowerShell script examples.
A project that enables an administrator to perform actions within a user session context not just at the time of login but any time later on day(s) or week(s) later.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the adminiā€¦

732 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