Use PSReadLine instead of ISE.
https://github.com/lzybkr/PSReadLineISE has bugs that the CLI doesn't (ex: splats for hashtable arguments used to not work in ISE - I don't know if that is still true, because I gave up using ISE and have only used the CLI for the last 2-3 years).