You can use the Select-Object:
Get-ChildItem . | Select-Object -last 1
If you want the latest file, something like:
Get-ChildItem . | Sort-Object LastWriteTime | select -last 1
And of course you can get only the properties that you are interested in with Select-Object as well:
Get-ChildItem . | Sort-Object LastWriteTime | Select-Object -last 1 Name,LastWriteTime
And you can pipe that to Export-Csv.
Aliases can also be used, Get-ChildItem
→ gci
, Select-Object
→ select
, and Sort-Object
→ sort
.