As you run PowerShell commands in the console,
you'll most likely find yourself rerunning earlier commands.
Now, this doesn't mean that you have to be constantly typing.
PowerShell has a command history that you can take advantage of.
Easiest way is to use the up and down arrows to
scroll through your command history.
When you find what you want, stop, press Enter, and just rerun that command.
Or you can make adjustments to the command and then run it.
PowerShell also has a history cmdlet called Get‑History,
which has an alias of h.
And there's also Invoke‑History,
which has an alias of r. Now, as you'll see in the demo, if
you know the history ID, you can easily rerun a command with
Invoke‑History or its alias.
I do this all the time in my PowerShell work.
The built‑in PSReadline module also has history‑searching capabilities,
which will be easier to demo than to try to explain here in a slide.
And then also, when I get to the demo,
I'm going to show you a new feature, at least new as the time I'm
recording this course, that uses your history that we have with
PSReadline to predict the command that you want to run.
Once you get the hang of these features,
you'll find it much easier and quicker to work in PowerShell without having to retype everything.