How to create scheduled task remotely (from a non-domain computer) with specific "RunAs"

Hi,

I am trying to remotely create a scheduled task on a domain member (a Win2K8 R2 machine).  I can do that successfully if I run the schtasks.exe from the domain controller machine, but I have not been able to run the schtasks.exe and create the task (on the domain member) from a non-domain machine successfully.

If I include the /RU-/RP and the /U-/P pairs of usernames/passwords, I get:

ERROR: No mapping between account names and security IDs was done.

If I include only the /RU-RP username/password, I get: 

ERROR: Access is denied.

If I include only the /U-/P username/password, I can create the task on the domain member, but when it runs, I get an error code -2147023651 (800704DD), which I think is:

"The operation being requested was not performed because the user has not 
logged on to the network. The specified service does not exist. "


http://www.archivum.info/microsoft.public.windows.backgroundtransfer/2006-10/00006/Re-Error-Code-2147023651-(0800704DD).html

Also, note that the task that I'm trying to run on the domain member must be run under the domain admin <domain>\administrator account, otherwise it seems to fail.

Is this a limitation if schtasks that it can't be run remotely unless both the target and the machine where the schtasks.exe is run are in the same domain?

Thanks,

Jim

July 6th, 2015 12:18am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics