Powershell is awesome, you might look into named parameters and validations on those parameters saves a lot of headaches. I typically lean toward using Write-Output instead of Write-Host but that might be a personal preference.
Yeah, thanks for the heads up Alan :)
As for the Write-Host, the main reason to use it is the colors. Since it's mainly a script to be executed by the user from the console, I thought the colors would be nice. But otherwise, just like you said, Write-Output is always better.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Powershell is awesome, you might look into named parameters and validations on those parameters saves a lot of headaches. I typically lean toward using Write-Output instead of Write-Host but that might be a personal preference.
Yeah, thanks for the heads up Alan :)
As for the
Write-Host
, the main reason to use it is the colors. Since it's mainly a script to be executed by the user from the console, I thought the colors would be nice. But otherwise, just like you said,Write-Output
is always better.