I know this thread is outdated, but here are other solutions
$myArray = "file1.csv","file2.csv" # Solution with single quote $a = "'$($myArray -join "','")'" $a # Result = 'file1.csv','file2.csv' # Solution with double quotes $b = '"{0}"' -f ($myArray -join '","') $b # Result = "file1.csv","file2.csv"
source share