How to restart agents on a server not linked to service manager

Discussion created by ShashiKishore on Dec 20, 2017
Latest reply on Dec 20, 2017 by Wolfgang_Brueckler_1288
Am having an agent or server which is linked to my service manager,in that server am having an another agent installed which is not linked to service manager .how to restart it.i am using this script,which says object is not present with that name,how to do it.
:set &agent_name# = 'McAfee Agent Service'
!stop the agent
:set &act# = modify_system('terminate', &agent_name#)
:wait 15
!start the agent
:set &ACT# = modify_system('startup', &agent_name#)