Hi all,
some help would be appreciated if possible. when i run the below cmdlet i get the following output
$service = (Get-Service -Name “SepMasterService”)
$service
Status Name DisplayName
Running SepMasterService Symantec Endpoint Protection
however if i run the below through a function using Invoke-Command i get the following error
$serviceName = “SepMasterService”
$Service = (Get-service -Name $serviceName)
$service
i get the below error
Cannot find any service with service name ‘System.ServiceProcess.ServiceController’.
+ CategoryInfo : ObjectNotFound: (System.ServiceProcess.ServiceController:String) [Get-Service], ServiceCommandException
+ FullyQualifiedErrorId : NoServiceFoundForGivenName,Microsoft.PowerShell.Commands.GetServiceCommand
looks like a pretty straight forward commond. what am I doing wrong here ?
TIA
Regards
Shihan