The PowerShell part of the syntax I have added works fine when executing it in PowerShell on Windows 10, but when I use it in SQL Server:
Exec xp_cmdshell 'powershell.exe Get-Content "c:/temp/test1.csv" |Select-Object -Skip 1 | Out-File "c:/temp/test2.csv"'
I get the error output
'Select-Object' is not recognized as an internal or external command
I assume this is a simple syntax question :)