- Clear Windows 10 (Server 2016) history “feature”
Remove-Item (Get-PSReadlineOption).HistorySavePath
- Reset the console buffer
ALT+F7
- Clear PSReadline’s session history
[Microsoft.PowerShell.PSConsoleReadLine]::ClearHistory()
- Clear PowerShell’s own history
Clear-History
Commands taken from this stackoverflow article