Is there a way to have PowerShell remember commands entered during the previous sessions? That is, after closing the window and opening it again, can PowerShell be setup to remember the commands?
With a little bit of scripting you could set this up, even without third party software. I would recommend reading the help on Get-History, Add-History, and about_History.
As the help explains, you can use Get-History to get your current history and with a command such as
Get-History | Export-CliXml C:\History.CliXml save it to a file. Following that, you could import your history using the Add-History command.
(The Add-History help file actually explains how to do this in more detail.)
I would expect that it is possible to configure your environment to perform these actions automatically, although I would question the usefulness of such a setup.
The Windows PowerShell in Windows 10 has this functionality by default.
The history file is located at