Empty fields even if there are filled

Hello all,

Maybe a newbie question here but here is my problem, I send a request on powershell like this :

Get-ADUser -Filter {(Office -eq "something") -and (msRTCSIP-Line -like "tel:*")} | fl name, Office, msRTCSIP-Line

Fact is : the request sent me the valid names, but the fileds Office and msRTCSIP-Line are empty in the result of the cmd... When I check in the attribute editor of AD, the fields are filled with something.

What am I doing wrong ?

Thanks,


July 16th, 2015 5:54am

You need to get the properties to display them - 

Get-ADUser -Filter {(Office -eq "something") -and (msRTCSIP-Line -like "tel:*")} -Properties Office,msRTCSIP-Line | fl name, Office, msRTCSIP-Line

Free Windows Admin Tool Kit Click here and download it now
July 16th, 2015 6:12am

You should enclose the property name with the dash with quotes ("msRTCSIP-Line"). Could be error-prone.

wizend

July 16th, 2015 7:08am

Awesome, many thanks :) It did the job !
Free Windows Admin Tool Kit Click here and download it now
July 16th, 2015 7:49am

Hi Sunnaa,

How about marking the answer, so that we can close this post.

July 16th, 2015 8:21am

You need to get the properties to display them - 

Get-ADUser -Filter {(Office -eq "something") -and (msRTCSIP-Line -like "tel:*")} -Properties Office,msRTCSIP-Line | fl name, Office, msRTCSIP-Line

Free Windows Admin Tool Kit Click here and download it now
July 16th, 2015 10:09am

You need to get the properties to display them - 

Get-ADUser -Filter {(Office -eq "something") -and (msRTCSIP-Line -like "tel:*")} -Properties Office,msRTCSIP-Line | fl name, Office, msRTCSIP-Line

July 16th, 2015 10:09am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics