I need to modify content in Powershell property Description
and then use the content in Sort-Object
, how can this be done ?
Below is my sample, which is not working:
Sort-Object -Property $($_.Description).Split(":")[2].Trimend(")") -Descending
Wrap your calculated property expression in
{}
: