PowerShell Export-Csv can't work with UseQuotes parameter
Asked Answered
J

1

5

I'm trying to start this from my Powershell script:

Import-Csv -Path $filecur -Delimiter ";" | Export-Csv -Path $filenext -Delimiter ";" -NoTypeInformation -Encoding Unicode -UseQuotes Never

But after executing Powershell script command promt show the next text:

Export-Csv : A parameter cannot be found that matches parameter name 'UseQuotes'.
At C:\Users\vad\Desktop\QuatesDeleter.ps1:4 char:116
+ ... ilenext -Delimiter ";" -notypeinfo -Encoding Unicode -UseQuotes Never
+                                                          ~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (:) [Export-Csv], ParameterBindingException
    + FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.ExportCsvCommand

How can I solve this problem? My computer is running under Windows 7, SP1, X64, PowerShell version is 5.1.14409.1005.

In Microsoft documentation I could't find some information about this problem

Link here

Jannet answered 18/3, 2020 at 13:10 Comment(0)
J
6

It's neccesary to install PowerShell version 7.x (PowerShell Core).

Jannet answered 19/3, 2020 at 9:19 Comment(1)
Use PS $PSVersionTable to check the version of your PowerShell using the PowerShell command prompt.Castora

© 2022 - 2024 — McMap. All rights reserved.