Where can you view the full history from all sessions in Windows Server 2016?
The following PowerShell command only includes the commands from the current session:
Get-History
In PowerShell enter the following command:
(Get-PSReadlineOption).HistorySavePath
This gives you the path where all of the history is saved. Then open the path in a text editor.
Try cat (Get-PSReadlineOption).HistorySavePath
to list the history in PowerShell.
Actually, it was there by default on a fresh install of Windows Server 2016.
It was in my Windows 10 Pro (1703). But I don't know if it was there by default or if there has been some module installed by Visual Studio or other similar tools. Still, it helped me, after my lates bluescreen.
It was there by default on Windows 10 Enterprise 64-bit.
basically use simply
cat (Get-PSReadlineOption).HistorySavePath
to get the whole history. thank you @DanielLeachUse
cat (Get-PSReadlineOption).HistorySavePath | select -Last 10
to get the last 10 lines. Useful if you have many commands in your history.