Script to Restart the Client Service
Created: 01 Mar 2013 | Updated: 13 Mar 2013 | 3 comments
Hi All,
Good Day.
We usually experience Disabled SEP clients across our Customer sites. And as a preliminary step we used to restart the service of the client. After logging to the client.
Here I am attached a psexec script which can execute remotely on the systems.
Limitations
- Since 32 bit and 64 bit machines are installed on different location we required two different script to stop the service
- It is not a 100 % automated script we need to type the command manually (only commands like smc.exe –start and smc.exe –stop )
How it works
The script uses PSEXEC from a free tool which uses port 445 to communicate to the client, which is used to communicate between the Server or client.
(before starting the script Download and keey the psexec.exe to system32 folder )
Usage
- Copy and paste the computer names from the disabled list to 32_bit_Hostlist.txt or 64_bit_Hostlist.txt wrt to the OS versions. (Normally we having majority 32 bit systems if a 64 bit OS computer added to the 32 bit host list noting will happen it will result “path not found and vice versa”)
- Double click on the Restart_Service_32_Bit.CMD / Restart_Service_64_Bit.CMD wt to 32 bit OS and 64 bit OS
- After giving command smc.exe –start / smc.exe –stop we need to exit from the console by exit command
- If the computer is offline or port not open it will result a output that path could not found
- If the command run successfully it will result a exit with an error code 0
Please find the attached Zip file for scripts
This solution works for my environment
Best Regards
Ajin
Download Filed Under:
Comments 3 Comments • Jump to latest comment
Thanks for sharing the script !
Kind regards,
John Santana
Graduate IT Professional
--------------------------------------------------
Please be nice to me as I'm newbie in this forum.
Nice Script.
Thanks.
Good one man!!!!
Good luck for next!!!
Thank& Regards,
Ambesh
Please mark your thread as 'SOLVED' with the answer that helps you.
Would you like to reply?
Login or Register to post your comment.