New Question
 
 
PRTG Network Monitor

Intuitive to Use.
Easy to manage.

200.000 administrators have chosen PRTG to monitor their network. Find out how you can reduce cost, increase QoS and ease planning, as well.

Free PRTG
Download >>

 

What is this?

This knowledgebase contains questions and answers about PRTG Network Monitor and network monitoring in general. You are invited to get involved by asking and answering questions!

Learn more

 

Top Tags


View all Tags


Need help monitoring a Windows Scheduled Task using ScheduledTask2XML

Votes:

0

Your Vote:

Up

Down

I downloaded ScheduledTask2XML and moved it into EXEXML under the Custom Sensors and setup a new custom sensor. Under Parameters I put in -c=Servername -t=taskname but I keep getting the error can't find task on this server. Anyone else run into this issue and if so is there a fix for this.

Thanks

custom-task prtg16 scheduled-task scheduledtask2xml server-2008

Created on Apr 1, 2016 12:38:19 PM by  mattsy (0) 1



11 Replies

Votes:

0

Your Vote:

Up

Down

Hi mattsy,

Open a commandline window in the folder where the executable is located and execute it this way: ScheduledTask2XML.exe -c="hostname" -u="domain\username" -p="password" -l (Last parameter is small letter "L")

What result do you get?

Kind regards.

Created on Apr 4, 2016 6:21:12 PM by  Erhard Mikulik [Paessler Support]

Last change on Apr 6, 2016 6:38:38 AM by  Erhard Mikulik [Paessler Support]



Votes:

0

Your Vote:

Up

Down

This helped me. The task name needs to have \ in front of it else it won't find it.

Created on Apr 4, 2016 6:30:53 PM by  mattsy (0) 1



Votes:

0

Your Vote:

Up

Down

I'm running into the same issue, here is my command and command line output:

PS D:\Program Files (x86)\PRTG Network Monitor\Custom Sensors\EXEXML> .\ScheduledTask2XML.exe -c=server.domain.net -t= "\job name" -u=domain\user -p=password -l

16.2.2.3
Check if Remote Registry Service is running.
<?xml version="1.0" encoding="utf-8"?><prtg><error>1</error><text>Cannot open Service Control Manager on computer 'server.domain.net'. This operation might require other privileges.</text></prtg>

I verified the remote registry service is running on the remote PC and that the account I am using is a domain admin so permission 'should' not be an issue.

Created on Jun 9, 2017 2:12:56 PM by  smiller (0)

Last change on Jun 9, 2017 2:55:44 PM by  Dariusz Gorka [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hi there,

Please try to put all parameters into quotes and check if this works:

.\ScheduledTask2XML.exe -c=server.domain.net -t= "\job name" -u="domain\user" -p="password"

Please note that the "-l" switch in the end only should be used when no job name is defined. So both "-t" and "-l" won't work. The parameters "-l" lists all available tasks.

Best regards.

Created on Jun 9, 2017 2:55:31 PM by  Dariusz Gorka [Paessler Support]



Votes:

0

Your Vote:

Up

Down

I confirmed that the task name is correct, and provided proper credentials and I receive the following message via command-line on Win2012 R2. Any ideas?

16.2.2.3
Check if Remote Registry Service is running.
Remote Registry Service is running.
<?xml version="1.0" encoding="utf-8"?><prtg><error>1</error><text>The task XML contains a value which is incorrectly formatted or out of range. (Exception from HRESULT: 0x80041318)</text></prtg>

Created on Jun 29, 2017 12:49:18 PM by  mcmiked (0)

Last change on Jun 29, 2017 6:28:59 PM by  Dariusz Gorka [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hi there,

As the error message states, have you checked that there is no Firewall or Software that could block the network access? If so, then make sure that the Remote Registry Service is started on the target machine.

Best regards.

Created on Jun 29, 2017 6:29:45 PM by  Dariusz Gorka [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hi, I have the same issue.

When I use the following command line I get a list of tasks which are in the PC specified. So the parameters must be alright. ScheduledTask2XML.exe -c=servername -t="\path\taskname" -l


Without the "-L" I get the following error: 16.2.2.3 Check if Remote Registry Service is running. Remote Registry Service is running. <?xml version="1.0" encoding="utf-8"?><prtg><error>1</error><text>The task XML contains a value which is incorrectly formatted or out of range. RESULT: 0x80041318</text></prtg>

Best regards

23.08.2017 - Modification small letter of L

Created on Aug 17, 2017 6:25:06 AM by  Kara (0) 1

Last change on Aug 23, 2017 10:27:47 AM by  Arne Seifert [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hi Kara,

So when you run "ScheduledTask2XML.exe -c=servername -L" you get the tasks listed? Try adding username and password: ScheduledTask2XML.exe -c=servername -t="\path\taskname" -u="domain\username" -p="password"

Kind regards,

Erhard

Created on Aug 18, 2017 10:33:38 AM by  Erhard Mikulik [Paessler Support]



Votes:

0

Your Vote:

Up

Down

Hi Erhard,

thanks for your response.

If I use this row of parameters, with the smaller letter of L, I get the task list, yes ScheduledTask2XML.exe -c=servername -t="\path\taskname" -u="domain\username" -p="password" -l

Without the small letter of L, I get the mentioned error.

Kind regards Kara

Created on Aug 23, 2017 10:14:31 AM by  Kara (0) 1



Votes:

0

Your Vote:

Up

Down

Dear Kara,

please clarify, does the sensor work as intended with the small-letter l, or are there open questions?

Created on Aug 23, 2017 10:29:32 AM by  Arne Seifert [Paessler Support]



Votes:

1

Your Vote:

Up

Down

After lot of tries implementing this type of sensor I noticed that only for some tasks it reported the error.

"<?xml version="1.0" encoding="utf-8"?><prtg><error>1</error><text>The task XML contains a value which is incorrectly formatted or out of range. (Exception from HRESULT: 0x80041318)</text></prtg>"

I've found that this issue occurs only with scheduled tasks that are "Configured for: Windows Server 2012 R2" , changing that option to "Windows7, 2008R2" solved it.

I hope it helps.

Created on Nov 9, 2017 3:10:04 PM by  VittorioG (10)

Last change on Jan 1, 2019 7:22:50 AM by  Luciano Lingnau [Paessler Support]



Please log in or register to enter your reply.


Disclaimer: The information in the Paessler Knowledge Base comes without warranty of any kind. Use at your own risk. Before applying any instructions please exercise proper system administrator housekeeping. You must make sure that a proper backup of all your data is available.