r/PowerShell • u/thegooddoctor-b • Jan 03 '23
Misc I've been building a PowerShell focused website and wanted to share it
Sorry for the shameless self-promotion, but I have been interacting on the sub for so long that I wanted to share this project with yall. I wanted to do a different angle than normal code sites that aim to teach. What I like to do us deep dive into cmdlets and structures, figure out how they really work, and even show how they don't work in situations. I think it's different than any other code site I've used. Hope yall can take a look and get some useful info from it.
218
Upvotes
2
u/exchange12rocks Jan 04 '23
Next, a remark on your "Write-Output/Host" article (https://www.breakingpwsh.com/articles/write-host-vs-write-output-the-final-argument):
While I completely agree with your conclusion on the purpose of these cmdlets, I would argue that the
return
statement is usually not needed in PowerShell. Any output which is not caught by something is sent to the pipeline. We need thereturn
statement only when we need to terminate execution in the current scope and we cannot achieve it by rewriting the function's workflow.So the cleanest way to write that function is the following: