Function return values is among the worst ideas the PowerShell designers dreamed up. A function will (more or less) return anything output to the terminal. This is a particularly bizarre decision considering how difficult it can be to get many Windows commands to be completely silent. Error handling, redirecting output, etc. all fail in many circumstances. It was completely aggravating. It has been a few years, so hopefully that's changed.