2 Replies Latest reply on Jun 5, 2017 12:02 PM by sathish1

    sript to enfore, collect and send, enfore policy - McAfee agent

    sathish1

      Hi All,

       

      Can anyone help me to create script to enfore, Collect and send, enfore Policy on client machine using a batch(.bat) File.

      Need to work on both 32 bit and 64bit operating systems.

       

      /pCollect and send properties to the ePO server
      /eEnforce policies locally
      /cCheck for new policies. The agent contacts the ePO server for new or updated
      policies, then enforces them immediately upon receipt.

       

       

      Thanks in Advance.

        • 1. Re: sript to enfore, collect and send, enfore policy - McAfee agent
          Moe Hassan

          sathish1, Please save these as .BAT file and run accordingly. If you wanted, you could put everything in one single file and run it on both 32bit or 64bit. I don't have a 32bit system but it's working OK on 64bit machine. You might want to remove the "PAUSE" command at the end. and You will see some errors saying "The system cannot find the path specified" on 64bit system. You can ignore that. I'm not a batch expert but there's more elegant way of skipping the whole section if the condition is not met. I think this will accomplish your goals in a SINGLE script. You can of course simply take the two lines from 32bit section and use that on your 32bit systems. That way you will have to create 1 batch file for your 64bit systems and 1 file for 32bit systems. I tried putting everything in one script. That's all.

           

          Example 1: BOTH 64bit and 32bit.

          IF EXIST %ProgramFiles%\McAfee\Agent\cmdagent.exe (

          GOTO 64bit

          :64bit

          ECHO Running ASCI for 64-bit.

          "%ProgramFiles%\McAfee\Agent\cmdagent.exe" /c

          "%ProgramFiles%\McAfee\Agent\cmdagent.exe" /p

          "%ProgramFiles%\McAfee\Agent\cmdagent.exe" /i

          )

          ELSE (

          GOTO 32bit

          :32bit

          ECHO Running ASCI for 32-bit.

          "%ProgramFiles%\McAfee\Common Framework\cmdagent.exe" /c

          "%ProgramFiles%\McAfee\Common Framework\cmdagent.exe" /p

          )

          pause

          Example 2: 64bit only

           

          "%ProgramFiles%\McAfee\Agent\cmdagent.exe" /c

          "%ProgramFiles%\McAfee\Agent\cmdagent.exe" /p

          "%ProgramFiles%\McAfee\Agent\cmdagent.exe" /i

           

          Example 3: 32bit only

          "%ProgramFiles%\McAfee\Common Framework\cmdagent.exe" /c

          "%ProgramFiles%\McAfee\Common Framework\cmdagent.exe" /p

          Simply save each of these with .BAT extension and run them on your systems. PLease let me know if you find this helpful. THanks.

          1 of 1 people found this helpful
          • 2. Re: sript to enfore, collect and send, enfore policy - McAfee agent
            sathish1

            Excellent thanks for your help. Will try and let you know the status