Pergunta

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
Foi útil?

Solução

$output123 ="$($userlist.Printer),$($userlist.CashDrawer)"
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top