How do I get a powershell query to show attribute values instead of just their names?

0

I am using powershell to query an Active Directory. I want to list user's names and their citizenship (e.g. US, AS, CA...). However, when I run the query, the results show the name and value for the Name attribute, but only the name for the Citizenship attribute followed by an equal (=) sign. This problem also comes up for example, when I try to do a list of user names and their workstation names. I know that there are values in those attributes, because I can see them when I use ADSI Editor. So how can I get this to work?

Tim David

Posted 2016-09-22T19:29:51.913

Reputation: 11

2How about you [edit] your question to include the PowerShell script you are using? That way we don't have to guess what you are doing ... – DavidPostill – 2016-09-22T21:07:29.273

Answers

0

When running Get-AdUser it only returns a limited set off attributes.

if you want to see the other attributes try using this:

Get-AdUser "Person" -Properties extentionAttribute10,dn | ft Name,extentionAttribute10,dn

Obvious, behind the properties part you name the properties you would like to see seperated by comma. and then you need to tell powershell to show these in the result, by naming them after the ft (Format-Table)

Kage

Posted 2016-09-22T19:29:51.913

Reputation: 341