Basically my issue comes down to this, I need to run code on a remote server using the ServerManager Module, but return the output to the local shell.
Here is the code run on WKS01:
Enter-PsSession SVR01
Import-Module ServerManager
$Roles = @(Get-WindowsFeature | Where {$_.installed -eq $true})
Now I need to use the data in $Roles on WKS01. Is there a way to do this? Am I going about this wrong?