Hello,
I am trying to execute the following command on a server in PowerShell v4 but receive an error stating that a parameter cannot be found that matches parameter name 'Encoding'. I am using this command in a script to change the encoding of the CSV file to UTF-8.
Get-Content -Path "X:\File.csv" | Set-Content -Path "X:\File.csv" -Encoding UTF8 -Force
The command runs fine on my local machine with PowerShell v5. The 'Encoding' parameter appears to be available in Get-Help Set-Content when I run it on the server.