Domanda

Im trying to join certain columns into a comma delimited array with powershell.

$userlist = Import-Csv C:\POS.csv | Where-Object {($_.StoreId -eq "4801") -and ($_.TouchPointID -eq "10")} 

$output123 = -join "$($userlist.Printer) $($userlist.CashDrawer)"

echo $output123

That gives me

Printer POS IBM4610-TF6 Cash Drawer POS IBM

But i want it

Printer POS IBM4610-TF6,Cash Drawer POS IBM
È stato utile?

Soluzione

$output123 ="$($userlist.Printer),$($userlist.CashDrawer)"
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top