更新时间:2023-12-01 11:31:52
您需要将属性添加到对象:
You need to add the property to the objects:
$a= import-csv -path c:\filename.csv -header Name,Id
foreach($item in $a){
Add-Member -Input $item -MemberType NoteProperty -Name Date -Value '2018-03-28'
}
$a | Select-Object Date, Name, ID | export-csv -path c:\outfile.csv -Notypeinformation