so i have a script to restart the ITSM agent to help solve the problem where endpoints show offline in the ITSM portal.
2 files:
put the ITSM Service.ps1 file in D:\scripts for example
put the Restart ITSM.ps1 on the desktop.
to run the script right click edit the Restart ITSM.ps1, change the line to suit the location and the pc name, then run it.
This will restart the ITSMService on the remote pc it will now show up in the ITSM Portal.
James.
Hello @dittoit
Thank you very much for sharing your method to restart the ITSM service in PCs within a domain. Much appreciated.
To anyone who would like to use the above script, let me just inform you that it is a PowerShell script. Hence, please do not run the above script through ITSM/RMM.
Needless to say, if you need clarifications about the PowerShell script, please do not hesitate to ask in this thread so that @dittoit can properly address it.
This is a awesome first step of resolving some of the issues from the other tickets as well. It would be nice if one could build a procedure for restarting services remotely, as most of the clients that are showing of-line arenāt actually offline and still receive the commands. It is just the āRemote Controlā feature that is offline.
I have tried messing with the āStop a Serviceā Procedure under āPredefined Procedures -> Systemā, however i canāt seem to get any of those to work even against systems sitting right next to me just for testing.
If we have procedure:
import os;
result=os.popen(āwmic service spooler call StopServiceā).read();
result=os.popen(āwmic service spooler call StartServiceā).read();
print(result);
potentially it should restart. However i am not sure how the Stop procedure takes in a variable as to which procedure to stop or start. If there is a procedure coding manual/guide that would be useful.
The request for the script has been sent to our script writers. We will keep you posted via this forum page and the ticket associated with the request. Thank you