Attempting to expand a calculated property results in the property not being found.
Get-ChildItem C:\Test | Select-Object Name, @{Name="KB";Expression={$_.length / 1kb}} -ExpandProperty KB
0.013671875
Select-Object : Property "KB" cannot be found.
+ CategoryInfo : InvalidArgument: (test.txt:PSObject) [Select-Object], PSArgumentException
+ FullyQualifiedErrorId : ExpandPropertyNotFound,Microsoft.PowerShell.Commands.SelectObjectCommand
PSVersion 5.1.17134.858
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17134.858
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
The property specified for -ExpandProperty must exist on the _input_ object - you cannot define a new calculated property and expand it _in the same call_.
You can pipe to _another_ Select-Object call in which you can perform the expansion (or, if you ultimately don't need the Name property, just use a ForEach-Object call in which you return the KB value).
P.S.: Please also give your issues a meaningful _title_ in the future.
This is very helpful. Thank you