When you hit F7 in PowerShell console it brings up a command history dialog box where you can choose and run history items like in the following image
But this feature doesn’t work in Powershell ISE or any other script editor.
Well to the rescue following is a quick function which uses Out-GridView cmdlet to mimic the simmilar behavior like in the above image.
Not only this function allows you to just run the history items, but you can select and run multiple of history items at once as in the following image.
When you hit OK, you’ll see all history items executed in your PowerShell console
Add this function to your Powershell profile and always keep it handy, to add it to your profile use the below onliner –
Hope you’ll find it useful, cheers!