My reply in this thread has not appeared:
https://powershell.org/forums/topic/powershell-delete-line-from-text-file-if-it-contains-certain-string/
Thanks,
Matt