How do I expand values returned from cmdlet?

Hello,

I’m trying to output to screen NoteProperty value which always truncated. Code is below. I’m reading values of VisibleCmdLets property of PSSessionConfiguration. How I can output entire string without truncating? I tried FL and FT but all of them are being truncated.

PS C:\Windows\system32> Get-PSSessionConfiguration GOC | Select VisibleCmdlets

VisibleCmdlets

{ARR-, Out-, Get-Command, Measure-object…}

PS C:\Windows\system32> Get-PSSessionConfiguration GOC | Select VisibleCmdlets | gm

TypeName: Selected.System.Object

Name MemberType Definition


Equals Method bool Equals(System.Object obj)
GetHashCode Method int GetHashCode()
GetType Method type GetType()
ToString Method string ToString()
VisibleCmdlets NoteProperty System.Object[] VisibleCmdlets=System.Object[]

I believe the title of your question is actually the answer to your question. The Select-Object cmdlet has a parameter named -ExpandProperty, which is likely what you want. Try running:

Get-PSSessionConfiguration GOC | Select -ExpandProperty VisibleCmdlets

Let us know how it went.

Thanks,that’s was it.