Neil Russell
asked on
output Arrays with headers....
Hi,
hopefully a simple question with a simple answer....
I Initialise an array, No problems,
I have an array populated in a loop, no problems.
I add to the array in an inside loop, again no problems
I output the array contents, no problem FIRST time through but read on....
I reinitialise the array and loop back to next itteration...
Now on the FIRST run through the loop i get output with column names of Name and Email nicely underlined with the array data below listed nicely. On subsequent iterations of the loop, no column headings show?
How do i force it to show these headers with eacho output of $myData?
Thanks
hopefully a simple question with a simple answer....
I Initialise an array, No problems,
$Global:myData = @()
I have an array populated in a loop, no problems.
{
I add to the array in an inside loop, again no problems
$myUser = Get-QADUser $username | Select Name, Email
$Global:myData += $myUser
I output the array contents, no problem FIRST time through but read on....
}
$myData | Sort Name | Select Name, Email -Unique
I reinitialise the array and loop back to next itteration...
$Global:myData = @()
}
Now on the FIRST run through the loop i get output with column names of Name and Email nicely underlined with the array data below listed nicely. On subsequent iterations of the loop, no column headings show?
How do i force it to show these headers with eacho output of $myData?
Thanks
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for tha
ASKER