Answered FEP/Schedule Task/Mapped Drives

  • Friday, May 18, 2012 9:23 PM
     
     

    How can I scan mapped drives using Forefront Endpoint Protection from command using task scheduler?

    If I use in task scheduler "C:\Program Files\Microsoft Security Client\Antimalware\mpcmdrun" -Scan -scantype 3 -File C:\Temp the scan works but if I use

    "C:\Program Files\Microsoft Security Client\Antimalware\mpcmdrun" -Scan -scantype 3 -File G:\Temp (G is a mapped drive) in task scheduler I get

    Warning: MpScan() encounter errror. hr = 0x80508023
    ERROR: MpScan(dwOptions=16385) Completion Failed 80508023

    If I run "C:\Program Files\Microsoft Security Client\Antimalware\mpcmdrun" -Scan -scantype 3 -File G:\Temp (G is a mapped drive) from a command window is runs fine.

    I need to do this from task scheduler so I can setup tasks to scan my NAS.


    Jason

All Replies

  • Friday, May 18, 2012 9:29 PM
     
     Answered

    Hi,

    When you run the scan using Task Scheduler it runs using the System Account and the drive is not mapped, that could be the problem.

    I would create a script Powershell/.cmd file and run it using a service acocunt with the necessery permissions and have the script map the drive, then initiate a scan.

    that should work.

    regards,
    Jörgen


    -- My System Center blog ccmexec.com -- Twitter @ccmexec

    • Marked As Answer by freebird_ Tuesday, May 22, 2012 7:54 PM
    •  
  • Friday, May 18, 2012 10:00 PM
     
     
    Ok, I have got a Powershell script working and running in task scheduler but I am getting the same error.  Can you please explain how to run it using a service account and map a drive, then start scan?

    Jason

  • Tuesday, May 22, 2012 5:56 AM
    Moderator
     
     


    Hi Jason,

    Thank you for the post.

    Please verify if map network drive with enable "Reconnect at login" and "different user name" options, set different user for task scheduler by clicking the Change User or Group button.
    http://compnetworking.about.com/od/windowsxpnetworking/ht/mapnetworkdrive.htm
    http://technet.microsoft.com/en-us/library/cc722152.aspx

    If there are more inquiries on this issue, please feel free to let us know.

    Regards


    Rick Tan

    TechNet Community Support