@echo off :: %1 is the compname (you need to have remote admin access for this to work properly) :: Stop the service (if not stopped already) sc \\%1 stop besclient :: Wait a bit for service to stop (using ping trick as a "wait" for 10 seconds) ping 1.1.1.1 -n 1 -w 10000 :: Rename __BESData folder (so if it has some corruption, it can be saved for later analysis)... This assumes the default folder for the agent... move "\\%1\c$\Program Files\BigFix Enterprise\BES Client\__BESData" "\\%1\c$\Program Files\BigFix Enterprise\BES Client\__BESData.bad" :: start the service again sc \\%1 start besclient