Solved

How to advance search in Windows using PS

Posted on 2016-09-24
4
27 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
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

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

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

Utilizing an array to gracefully append to a list of EmailAddresses
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.

809 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