将Unix1Liner转换为PowerShell

Q B*_*ler 2 unix powershell

我想将以下Unix 1 Liner转换为PowerShell.

命令概要:此命令将递归搜索具有扩展名.jsp的任何文件的PWD(当前工作目录),并在文件中查找"logoutButtonForm"的简单字符串匹配.如果找到匹配项,它将打印文件名和匹配的文本.

find . -name "*.jsp" -exec grep -aH "logoutButtonForm" {}\;
Run Code Online (Sandbox Code Playgroud)

我是电脑外壳的新手,已经做了一些谷歌搜索/叮当声,但还没有找到一个好的答案.

Kei*_*ill 6

ls . -r *.jsp | Select-String logoutButtonForm -case
Run Code Online (Sandbox Code Playgroud)

我倾向于选择-Filter over -Include.猜测在观察PowerShell 1.0中的错误行为后,我从不信任-Exclude/-Include参数.此外,-Filter明显快于使用-Include.