Get-History | Export-Clixml "c:\scripts\my_history.xml"
Use this to restore Powershell history from file.
Import-Clixml "C:\PowershellSession.xml" |Add-History
How to show the list of command history?
h or Get-History
How can i find out the alias for Get-History?
Get-Alias -Definition Get-History

What to do if I have duplicate command in the history?
We wish to have a unique entry per command. Edit the window properties and check 'Discard Old Duplicates'.
No comments:
Post a Comment