I would like to know why when I run my script the result shows me ";" between my arrays. I'm actually trying to compare two excel columns and display the difference. If a cell isn't in the first column but is in the second it display the column. How can I remove these ";" and get the difference between the columns? I've also tried with some files with one column and it works
result:
ComputerName;;;;;OtherComputerName
----------------------------------
uiojk;;;;;uih
hjbyu;;;;;ubyhi`
script:
#get the content of the column in the file
[string[]]$a = import-csv '.\test1.csv' | select -expand ComputerName
[string[]]$d = import-csv '.\test1.csv' | select -expand OtherComputerName
#display the cells which aren't in the $a list
$d |? {$a -notcontains $_}
#displays the columns of one file
[Array]$stores[2].ComputerName
[Array]$stores[2].OtherComputerName
$stores