サーバー上のすべての共有で のワイルドカードを検索する PowerShell スクリプトを探しています*_HELP_instructions*
。検索するファイルの例は、12_HELP_INSTRUCTIONS.txt
または22_HELP_INSTRUCTIONS.html
.
これまでのところ、C:\ の内容を検索する以下のスクリプトがありますが、代わりにサーバー共有を検索するようにセットアップできるスクリプトが必要です。
$FilesToSearch = Get-ChildItem "C:\*" -Recurse -ErrorAction SilentlyContinue |
where {$_.Name -like "*_HELP_instructions*"}
if ($FilesToSearch -ne $null) {
Write-Host "System Infected!"
exit 2015
} else {
Write-Host "System Not Infected!"
exit 0
}