Get-Aduser why no output?

Hi Guys,

I use this script to get some values from some ad users.

But i know for sure that “company” is filled in can please somebody tell me why this is not filled in my ouput?


$users = Get-Content "C:\temp\users.txt"

$output = Foreach ($user in $users){
    $user = "*" + $user + "*"
    Get-ADUser -Filter {Name -like $user } | Select-Object SamAccountName, Enabled, Company} 


SamAccountName Enabled Company
-------------- ------- -------
Testuser1 True 
testuser2 True 
testuser3 True

already found the solution -properties * thanks :slight_smile:

You can specify -Properties Enabled,Company instead of getting all properties using *

+1 to the only asking for needed properties.