title: Powershell error adding to an array
body: <p>Hi I am trying to run a script to get users in a network into an array so that it can be outputted to a csv file along with other data that I am going to get, such as distribution groups. </p>
  
  <p>The code script I am running is giving an error: </p>
  
  <blockquote>
    <p>Method invocation failed because [System.Management.Automation.PSObject] doesn't contain a method named 'op_Addition'.</p>
  </blockquote>
  
  <p>The script is a simple for loop:</p>
  
  <pre><code>$ActiveDirectoryList=@() 
  $UserDetails = get-aduser -filter {enabled -eq $true} -properties * | Select DisplayName,EmailAddress, SAMAccountName
  $counter = 0
  foreach($User in $UserDetails){
  
      $ActiveDirectoryList = New-Object PSObject
      $Users = get-aduser $User.SAMAccountName -properties * 
      if(!$Users.EmailAddress -eq ""){
          $counter++
          $ActiveDirectoryList | Add-Member -MemberType NoteProperty -Name "DisplayName" -Value $Users.DisplayName
          $ActiveDirectoryList | Add-Member -MemberType NoteProperty -Name "Email Address" -Value $Users.EmailAddress 
          write-host $Users.DisplayName
          $ActiveDirectoryList+=$ActiveDirectoryList
      }
  }
  </code></pre>
  
  <p>Tried looking on the internet for a solution but they don't seem to solve anything.</p>