New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove Write-Host from Get-EnterprisePKIHealthStatus #4
Comments
Looks like it is an artifact from my early POCO version. Although, there is a such recommendation to not use Write-Host, I'm still using it in several cmdlets because there is no better way to respond to user. However, this issue is not the case and I fixed it in 3aab19f. I will work further to remove all ambigous Write-Host occurences. For consistency puproses, please open the "Write-Host" and "Write-Warning" issues against the following commands. so I'll be able to track them:
You are not required to close this issue, because I'll close it when publishing next module release. |
Thanks, @Crypt32! Is there actually a reason you would suggest removing |
yep. The module was created long ago before there guidelines were created (2009, or 2010). Originally, PowerShell community suggested to use |
I mean that |
Thanks for the clarification. I am going to open a separate issue to have this fixed in the functions you listed. |
Yes, please do. I checked listed functions and it appears that |
The work is in progress in this branch: https://github.com/Crypt32/PSPKI/tree/feature-WriteHostCompliance |
I am not sure if the back and force, between Write-X (#4, #5 ) is an efficient approach. I can only add, that in a Desired State Configuration / Alternatives world (where we stop to use code in production environemnents, in an interactive fashion and output/report errors to different streams), I still would like to work with your Module(s) instead of what is available as of today. For example the carbon module managed to to be one solution for both worlds and managed to be usefull in designing an environment line by line or in pushing out the result as a DSC configuration in the end. |
some ideal world. In real world there still are operational tasks which can't be solved by DSC. Therefore, some interactiveness is still necessary. |
Hi,
As per the best practices, cmdlets should not be using Write-Host function to display any output. Anyhow, it seems that
Get-EnterprisePKIHealthStatus
cmdlet does not comply with that, always outputting the CA name due to the following line:Is it possible to remove this line, convert it to Write-Verbose or introduce an additional switch parameter which would allow to suppress it?
Thank you.
The text was updated successfully, but these errors were encountered: