I have this script...
Which looks at a given network location and then goes through all the folders / subfolders to search for specific words / phrases. Looking to modify to be able to do the same for ZIP files. Working in the same manner, report back any ZIP files which contain the words set out but also any files within the ZIP...
Any help?
"`n"
write-Host "Search Running" -ForegroundColor Red
$filePath = "\\fileserver\mydepts\IT"
"`n"
Get-ChildItem -Recurse -Force $filePath -ErrorAction SilentlyContinue | Where-Object { ($_.PSIsContainer -eq $false) -and ( $_.Name -like "*test*" -or $_.Name -like "*bingo*" -or $_.Name -like "*false*" -or $_.Name -like "*one two*" -or $_.Name -like "*england*") } | Select-Object Name,Directory,CreationTime,LastAccessTime,LastWriteTime | Export-Csv "C:\scripts\searches\csv\results.csv" -notype
write-Host "------------END of Result--------------------" -ForegroundColor Green