Multidimentional Array problem

by Feb 23, 2011

I'm trying to get a list of users on a domain using Quest's get-qaduser command.  I want to link the name of the users with their last login time.  I would like to create a two dimensional array to store the name/date data pair and then sort by the date.  However, I when the array I create seems to be one dimensional with one value being the user name and the next being the login time.  The length property of the array is exactly twice the number of users.

Is this problem due to the way I create the array, reference the array or some other issue?


get-qaduser | foreach-object {
[String]$name = $_.Name
[String]$time = $_.LastLogon
Write-Output $LoginTime