Author Posts

April 11, 2014 at 10:12 pm

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] ] [-ExcludeProperty ] [-ExpandProperty ] [-First ] [-In
putObject ] [-Last ] [-Skip ] [-Unique] []

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.

April 12, 2014 at 2:33 am

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.