I am stuck on a point where I have two array variables like this
$name = @("A","B","C")
$roll = @("1","2","3")
and I am trying to make a csv file with this data. I am using this code
$name = @("A","B","C")
$roll = @("1","2","3")
$report = New-Object psobject
$report | Add-Member -MemberType NoteProperty -Name "Name" -Value "$name"
$report | Add-Member -MemberType NoteProperty -Name "Roll" -Value "$roll"
$report | Export-Csv -Path "C:\Users\Abby\Desktop\r.csv" -NoTypeInformation
But I have a output like this
NAME | ROll
A B C| 1 2 3
I want my output like this
NAME | ROll
A | 1
B | 2
C | 3
Can any one have any idea how to do these... Please help me... :(