SyntaxFix
Write A Post
Hire A Developer
Questions
Have you tried:
$OutputVariable = (Shell command) | Out-String