I have a file with some information, I would copy some content work from that file to another file like all the services status stored in a file and need to copy which one was stopped status from that file and copy those stopped services to paste a new file with new name,
Rather than parse a file with service state, assuming these are Windows services, you should use Get-Service where you can directly filter the results. Take a look at example 5.
If you are still set on parsing the file, then you need to look at Get-Content and Select-String. If you do some searching, you’ll find examples for just about anything that should help you parse a file with Powershell. When you need help with errors or something not working as expected, post your code, file examples, etc., but do not assume someone will write the script for you.