资讯

To put it another way, you can embed PowerShell commands within a Write-Host statement (though subexpressions can be used outside of a write-host statement, as you have already seen).
Have you ever noticed that if you include a variable within a PowerShell Write-Host statement, that variable is evaluated, even if you include the reference to the variable within the quotation ...
You can use any color option that you get with Write-Host. Here's a shortcut to list those options: PS C:\> [system.consolecolor]::GetNames ("consolecolor") Black DarkBlue DarkGreen DarkCyan DarkRed ...
So basically, the general question is: is it possible to do a "Write-Host" (or some other command) that overwrites the same line on the screen? EDIT: This in the PowerShell ISE, specifically, btw.