I am not sure why the output is not working correctly. Can someone please advise. Essentially the array works, except for 1 major issue. everytime a new object gets added to the array it replaces all the previous objects in the array with the last one entered.

I get my array of objects, I just want it to add to the array the new data object, not replace all previous entries and add the new data object.

I can not figure out what I am doing wrong.

```
$RptInfo = New-Object Object -TypeName PSObject
Add-Member -MemberType NoteProperty -Name Counted -Value "" -InputObject $RptInfo 
Add-Member -MemberType NoteProperty -Name ItemName -Value "" -InputObject $RptInfo 
Add-Member -MemberType NoteProperty -Name ItemType -Value "" -InputObject $RptInfo 
Add-Member -MemberType NoteProperty -Name LineURI -Value "" -InputObject $RptInfo 
Add-Member -MemberType NoteProperty -Name RegistrarPool -Value "" -InputObject $RptInfo 
Add-Member -MemberType NoteProperty -Name Identity -Value "" -InputObject $RptInfo 
Add-Member -MemberType NoteProperty -Name Office -Value "" -InputObject $RptInfo 
Add-Member -MemberType NoteProperty -Name OfficeName -Value "" -InputObject $RptInfo 
Add-Member -MemberType NoteProperty -Name DisplayName -Value "" -InputObject $RptInfo 
Add-Member -MemberType NoteProperty -Name Location -Value "" -InputObject $RptInfo 
Add-Member -MemberType NoteProperty -Name VoicePolicy -Value "" -InputObject $RptInfo 
Add-Member -MemberType NoteProperty -Name DialPlan -Value "" -InputObject $RptInfo 
[array]$RptArray = @()
$VoicePolicy_Table = Get-CsUser | Where {$_.EnterpriseVoiceEnabled -eq $true} | Sort-Object -Property VoicePolicy | Group-Object -Property VoicePolicy, 'Voice Policy'
$DialPlan_Table = Get-CsUser | Where {$_.EnterpriseVoiceEnabled -eq $true} | Sort-Object -Property DialPlan | Group-Object -Property DialPlan, 'Dial Plan'
foreach ($VP in $VoicePolicy_Table) {
    $RptInfo.Counted = $VP.Count
    $RptInfo.ItemName = $VP.Name
    $RptInfo.ItemType = 'Voice Policy'
    $RptArray += $RptInfo
}
ForEach ($RPT in  $RptArray) {    
    $RPT.ItemName
}

```