For those of us coming from the linux world, Power shell has a tempting assortment of linux like commands, however every so often it still feels like you are trapped in bizaro land and the commands don’t quite match up. Today was one of those days.
Fear not, there is a one-liner that will get you the history that you need and love:
Get-Content (Get-PSReadlineOption).HistorySavePath | tail -n 20
(this will get the text from your power shell history file and print the last 20 commands)