cd C:\Spam
$rootUrl = '\/CWS\/Payment\/PdfReport'

$select = Get-Item *.log | Select-String -Pattern $rootUrl
$selectcsv = $select.line | ConvertFrom-Csv -Delimiter ' ' -Header ('date time s-sitename s-computername s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs-version cs(User-Agent) cs(Cookie) cs(Referer) cs-host sc-status sc-substatus sc-win32-status sc-bytes cs-bytes time-taken' -split ' ')

#$select2 = $select | where { $_.line -match 'documentNumber=F007940834' -or  $_.line -match 'documentNumber=F001602219' -or  $_.line -match 'documentNumber=F004716680' -or  $_.line -match 'documentNumber=F007000458' }
#$select2csv = $select.line | ConvertFrom-Csv -Delimiter ' ' -Header ('date time s-sitename s-computername s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs-version cs(User-Agent) cs(Cookie) cs(Referer) cs-host sc-status sc-substatus sc-win32-status sc-bytes cs-bytes time-taken' -split ' ')
#$select3 = $select | where { $_.line -match '69303ba0-4050-4219-9913-af7ca3a8ad31' }
#$select3csv = $select3.line | ConvertFrom-Csv -Delimiter ' ' -Header ('date time s-sitename s-computername s-ip cs-method cs-uri-stem cs-uri-query s-port cs-username c-ip cs-version cs(User-Agent) cs(Cookie) cs(Referer) cs-host sc-status sc-substatus sc-win32-status sc-bytes cs-bytes time-taken' -split ' ')

$select2 = $selectcsv.'cs-uri-query' | Select-String -Pattern 'documentNumber=([A-Z][0-9]*)'

$data = @'
F000018636
F000021482
F000024219
F000026112
F000028853
F000031097
F000034604
F000038300
F000044790
F000048042
F000050669
F000053147
F000057263
F003002358
F003007266
F003010442
F003017056
F003021908
F003026206
F003030162
F003036063
F003041789
F003042429
F003051839
F003057120
F003061224
F003066429
F003076822
F003081376
F003087833
F003094635
F003103301
F003107703
F003112733
F003118791
F003124053
F003131888
F003138217
F003144770
F003149616
'@
$find = $data.Split("`r`n", [System.StringSplitOptions]::RemoveEmptyEntries)

$get = $select2 | % { 
    Write-Host "Matching '$($_.Matches[0].Groups[1].Value)'" 
    if($_.Matches[0].Groups[1].Value -match ($find -join ',')) { $_.Matches[0].Groups[1].Value } 
}
