#cmd
type %userprofile%AppDataRoamingMicrosoftWindowsPowerShellPSReadlineConsoleHost_history.txt
#Powershell
type $Env:userprofileAppDataRoamingMicrosoftWindowsPowerShellPSReadlineConsoleHost_history.txt
Get-History | Format-List -Property *
#By default, the PowerShell in Windows 10 saves the last 4096 commands that are stored in a plain text file located in the profile of each user:
get-content $env:USERPROFILEAppDataRoamingMicrosoftWindowsPowerShellPSReadlineConsoleHost_history.txt