Powershell – Tip – Write-Host

I always forget to wrap the text in () which allows using the replace or formatting method to substitute a value. So here it is:

Write-Host -ForegroundColor Blue ("Found {0} servers" -f  $a.Length)

Comments are closed.

Post Navigation