Saw a question about splitting a file that had repeating data blocks.
Each block starts with HOST so the code to split becomes:
$fnum = 1
Get-Content -Path C:testData.txt |
ForEach-Object -Process {
if ($_ -like 'HOST*') {
$file = "C:test… Read the full text.