This is more for my own reference in the future when I forget the command.
If you are used to Linux / Unix and use “grep -v” to filter out lines in text files (-v does the opposite to grep without -v) then the following command will be useful for PowerShell in Windows.
gc sourcefile.txt | ?{$_ -notmatch 'HashedSaltedPassword'}
The above would take sourcefile.txt and display all the lines except the lines containing “HashedSaltedPassoword”. You can then “> outfile.txt” on the end to dump all that data to a new file instead of to the screen.
gc sourcefile.txt | ?{$_ -notmatch 'HashedSaltedPassword'} > outfile.txt