Powershell Scripts

Get the top 10 records and save it to a different file

Get-Content “C:\start.csv” | select -First 10 | Out-File “C:\stop.csv”

Find the needle in the file and then save the first 10 to a new file.

Select-String -Pattern “google_product_category” -Path .\GoogleProductFeed.xml | select -First 10 | Out-File .\findings.xml