# Select-Object to use property and expand property

**URL:** <https://forums.powershell.org/t/select-object-to-use-property-and-expand-property/2452>\
**Category:** PowerShell Help\
**Created:** [April 11, 2014, 4:42pm UTC](https://forums.powershell.org/t/select-object-to-use-property-and-expand-property/2452 "2014-04-11T16:42:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![krushna-vardhan-redd](https://avatars.discourse-cdn.com/v4/letter/k/c0e974/32.png) [@krushna-vardhan-redd](https://forums.powershell.org/u/krushna-vardhan-redd)\
**Post date:** [April 11, 2014, 4:42pm UTC](https://forums.powershell.org/t/select-object-to-use-property-and-expand-property/2452/1 "2014-04-11T16:42:50Z")

</div>

Hi,

I have a small issue, how to use both property and expand property at the same time. Though they are in same parameter set, i am unable to use it.

Select-Object [[-Property] \<Object\>] [-ExcludeProperty \<string\>] [-ExpandProperty \<string\>] [-First \<int\>] [-In  
putObject \<psobject\>] [-Last \<int\>] [-Skip \<int\>] [-Unique] [\<CommonParameters\>]

Example: PS C:\Users\kvrpakkiragari\> Get-Process powershell | Select-Object -Property \* -ExpandProperty StartInfo

Verb :  
Arguments :  
CreateNoWindow : False  
EnvironmentVariables : {temp, processor\_revision, processor\_level, logonserver…}  
RedirectStandardInput : False  
RedirectStandardOutput : False  
RedirectStandardError : False  
StandardErrorEncoding :  
StandardOutputEncoding :  
UseShellExecute : True  
Verbs : {}  
UserName :  
Password :  
Domain :  
LoadUserProfile : False  
FileName :  
WorkingDirectory :  
ErrorDialog : False  
ErrorDialogParentHandle : 0  
WindowStyle : Normal

getting output of only expand property.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/powershell/original/1X/385e4f9fe133561ad30a814262fe0e0ae6bc3ef0.png) [@system](https://forums.powershell.org/u/system)\
**Post date:** [April 11, 2014, 9:03pm UTC](https://forums.powershell.org/t/select-object-to-use-property-and-expand-property/2452/2 "2014-04-11T21:03:10Z")

</div>

I can reproduce this in PowerShell 2.0, but in 4.0 it works fine. Not sure about 3.0; I don’t have a system handy that hasn’t been upgraded to 4.0 right now.

---

<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:52pm UTC](https://forums.powershell.org/t/select-object-to-use-property-and-expand-property/2452/3 "2024-05-16T20:52:11Z")

</div>

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


