if(!$creds){ $creds = Get-Credential } $list = Get-ADUser -Credential $creds -server lbdc01.mpe.ca -SearchBase "OU=MPEUsers,DC=mpe,DC=ca " -Filter * -Properties telephoneNumber,title,DisplayName $newList = @() foreach($person in $list){ if(!$person.telephoneNumber -or !$person.title){ $personObject = [PSCustomObject]@{ "Name"=$person.DisplayName "Title"=$person.title "Phone"=$person.telephoneNumber } $newList += $personObject } }