Running the following command in powershell command prompt works as i would expect:
Get-Service "my_service"
*output*
Status Name DisplayName
------ ---- -----------
Running my_service My_SERVICE
However if make a ps1 scritp as follows my output is not what i would expect.
$my_service_check = Get-Service "my_service"
echo "My Service Status: $my_service_check"
*output*
my_service: System.ServiceProcess.ServiceController
why does the script not return the same output as the command?