Although this chapter conflicts with tips on not purely focusing on performance, there’s a fine line to follow. On the one hand, you don’t need to get bogged down shaving off microseconds of runtime. On the other hand, though, you shouldn’t completely disregard script performance.
There is a gray area that you need to stay within to ensure a well-built PowerShell script.
Don’t Use Write-Host in Bulk
Although some would tell you never to use the Write-Host cmdlet , it still has its place. But, with the functionality, it brings also a small performance hit. Write-Host does nothing ...