# include noteproperty in output with select-object

**URL:** <https://forums.powershell.org/t/include-noteproperty-in-output-with-select-object/13462>\
**Category:** PowerShell Help\
**Created:** [November 22, 2019, 4:25pm UTC](https://forums.powershell.org/t/include-noteproperty-in-output-with-select-object/13462 "2019-11-22T16:25:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![john-curtiss](https://avatars.discourse-cdn.com/v4/letter/j/f1d935/32.png) [@john-curtiss](https://forums.powershell.org/u/john-curtiss)\
**Post date:** [November 22, 2019, 4:25pm UTC](https://forums.powershell.org/t/include-noteproperty-in-output-with-select-object/13462/1 "2019-11-22T16:25:16Z")

</div>

[https://powershell.org/forums/topic/include-noteproperty-in-output-with-select-object/](https://powershell.org/forums/topic/include-noteproperty-in-output-with-select-object/)

$object | get-member says:

displayname property  
id property  
[Microsoft.Windows.Computer].PrincipalName noteproperty

how do i get to that principalname with a select-object or a where-object? these three are not doing it:

$object | select [Microsoft.Windows.Computer].PrincipalName  
$object | select PrincipalName  
$object | select @{label=‘principalname’;expression={$\_.[Microsoft.Windows.Computer].PrincipalName} }

---

<div class="post-metadata">

**Author:** ![Olaf](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/olaf/32/992_2.png) [@Olaf](https://forums.powershell.org/u/Olaf)\
**Post date:** [November 22, 2019, 4:31pm UTC](https://forums.powershell.org/t/include-noteproperty-in-output-with-select-object/13462/2 "2019-11-22T16:31:44Z")

</div>

You may show a little bit more of the code you’re using to create the $object.

And please format you code as code using the code tag button (pre). Thanks.

---

<div class="post-metadata">

**Author:** ![swsamwa](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.powershell.org/swsamwa/32/62_2.png) [@swsamwa](https://forums.powershell.org/u/swsamwa)\
**Post date:** [November 23, 2019, 6:11pm UTC](https://forums.powershell.org/t/include-noteproperty-in-output-with-select-object/13462/3 "2019-11-23T18:11:16Z")

</div>

Select-Object doesn’t know how to parse a property name like that. But you can use the object property access operator (.) to get the value.

`$object.‘[Microsoft.Windows.Computer].PrincipalName’`

`$object | select @{l=‘PrincipalName’; e={$_.‘[Microsoft.Windows.Computer].PrincipalName’}}`

&nbsp;

---

<div class="post-metadata">

**Author:** ![john-curtiss](https://avatars.discourse-cdn.com/v4/letter/j/f1d935/32.png) [@john-curtiss](https://forums.powershell.org/u/john-curtiss)\
**Post date:** [November 25, 2019, 4:14pm UTC](https://forums.powershell.org/t/include-noteproperty-in-output-with-select-object/13462/4 "2019-11-25T16:14:46Z")

</div>

thank you Sean. i was missing the single quotes around ‘[Microsoft.Windows.Computer].PrincipalName’.

&nbsp;

---

<div class="post-metadata">

**Author:** ![dotnVo](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@dotnVo](https://forums.powershell.org/u/dotnVo)\
**Post date:** [May 16, 2024, 8:31pm UTC](https://forums.powershell.org/t/include-noteproperty-in-output-with-select-object/13462/5 "2024-05-16T20:31:00Z")

</div>

Closed on May 16, 2024, 8:31pm UTC


