cancel
Showing results for 
Search instead for 
Did you mean: 
McAfee Employee Greg_Steele
McAfee Employee
Report Inappropriate Content
Message 1 of 5

Run Task Now

Good Afternoon,

Does anyone have a script that will trigger the  "Run Task Now" function via the WebAPI? (epo 4.6.6 & MA 4.6.2)

4 Replies

Re: Run Task Now

Is there a specific language you are looking for?

My primary is Powershell so that is all I would be able to help with.

McAfee Employee Greg_Steele
McAfee Employee
Report Inappropriate Content
Message 3 of 5

Re: Run Task Now

Mingle1....

We are scripting in python, but we do know a little powershell. Anything you feel comfortable sharing is very much appreciated.

Highlighted

Re: Run Task Now

The main pieces that may help point you in the right direction:

[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}

$url = "https://server:8443/remote/clienttask.find?searchText=rogue&:output=xml"

$navigate = new-object System.Net.WebClient

$navigate.credentials = New-Object system.net.NetworkCredential($user, $password, $domain)

$res = $navigate.DownloadString("$url")

That will search the client tasks looking for the rogue and output in xml.

The following will be what is constructed after parsing the above output:

[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}

$url = "https://server:8443/remote/clienttask.run?names=computername&productId=RSDMETA&taskId=3&:output=xml"

$navigate = new-object System.Net.WebClient

$navigate.credentials = New-Object system.net.NetworkCredential($user, $password, $domain)

$res = $navigate.DownloadString("$url")

I have also attached a file that will show all the options for clienttask.find and clienttask.run

I got this from the webApi Explorer.

Hope this helps!

McAfee Employee Greg_Steele
McAfee Employee
Report Inappropriate Content
Message 5 of 5

Re: Run Task Now

Thanks Mingle1..... I very much appreciate it.

More McAfee Tools to Help You

Community Help Hub

    New to the forums or need help finding your way around the forums? There's a whole hub of community resources to help you.

  • Find Forum FAQs
  • Learn How to Earn Badges
  • Ask for Help
Go to Community Help

Join the Community

    Thousands of customers use the McAfee Community for peer-to-peer and expert product support. Enjoy these benefits with a free membership:

  • Get helpful solutions from McAfee experts.
  • Stay connected to product conversations that matter to you.
  • Participate in product groups led by McAfee employees.
Join the Community
Join the Community