OK, with all the necessary infomration we gathered step by step I'd come up with this simple solution:
$Path = '\myfileserverfiles999.80214.va.000000373.20210122.173314.20210755'
$Content = Get-Content -Path $Path
$NewContent =
(($Content | Select-Object -First 1) -replace '(?<=*)T(?=:$)','P'),
($Content | Select-Object -Skip 1)
Set-Content -Path $Path -Value $NewContent
It takes the content of the file, changes only the first line, combines this new first line with the original unchanged rest of the file and writes it back to the original file.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…