Re-Running Powershell History

Claudio Silva shows how to re-run statements in your Powershell history:

While we were running some commands we talked about Get-History cmdlet.

For those who don’t know

this cmdlet lists all the commands that you already ran on the current session.

I wondered if it is possible to pipe the Get-History output and run it again. I could bet yes but I never tried before.

The answer is that yes, you can, and Claudio shows how.

Related Posts

Watch Those Powershell Shell Versions

Emin Atac reviews a couple of 64- versus 32-bit Powershell oddities: Context My colleagues send an message with a link that points to a script located on a shared drive to help our users reinstall their software. Our users just click on the link in their Outlook and got a message saying: \\servername.fqdn\share\softwarename\install.ps1 cannot be […]

Read More

Simplified Disaster Recovery With dbatools

Chrissy LeMaire shows how you can make DR a lot easier with dbatools: When we talk about Disaster Recovery or DR, it’s often coupled with the term High Availability or HA. Here are some definitions from my graduate course on HADR. high availability Deals with minor outages, and failover solutions are automated The goal is to restore full […]

Read More

Categories