I have a script that scrapes the raw html off of a webpage. When it does so, it has 17 lines at the top of the text file (output) that I want to be removed. How would one delete entire lines in powershell?
The generated lines are unique every time I run the script.
Current code:
$scrape = Invoke-Webrequest -uri "http://example.com/webpage"
$scrape.rawcontent | Out-File -FilePath C:\Users\outputlocation.txt -append
It then creates a file and gives me "stats" of the scraped webpage at the top of the file since it's the raw content. Deleting the first 17 lines would solve my issue.
Thanks!