get-childitem -filter *.log -recurse | select-string -pattern "\s40[0-9]\s" | format-table Filename,LineNumber,Line -wrap get-childitem -filter *.log -recurse | select-string -pattern "\s40[^4][0-9]?\s" | format-table Filename,LineNumber,Line -wrap get-childitem -filter *.log -recurse | Select-string -pattern "10\.0;[\w\W]+\+Gecko" 1: Get-ChildItem c:\windows | where {$_.name -match "\d{2}"} Get-ChildItem c:\windows | where {$_.name -match "[0-9]{2}"} Get-Module | where {$_.companyname -match "Microsoft"} get-content WindowsUpdate.log | Select-string "[\w+\W+]Installing Update" Get-content WindowsUpdate.log| select-string "[\w+\W+]Installing"| format-table LineNumber,Line -wrap