Let lets look more into powershell “special” characters and variables you can use.

Just writing a simple output to the shell and see what we can do.

Write-Host "Hello World!" -ForegroundColor Green

And we see that we get an output of Hello World in Green.

If we then type

$^

The output is then is the fist input in the last command, in this case “Write-Host”

And there is another one, to get the last input of the last command, so if we start again, and try that.

Write-Host "Hello World!" -ForegroundColor Green
$$

We get the output “Green”