Using a non-Administrator (or Administrator) cmd.exe
, I enter the following command to create a scheduled task with Administrator credentials admin
and P@ssw0rd
:
schtasks /CREATE /S %computername% /U admin /P P@ssw0rd /RU SYSTEM /SC ONLOGON /TN SYSTEM_notepad /TR C:\Windows\System32\notepad.exe
ERROR: User credentials are not allowed on the local machine.
However, I get the error message ERROR: User credentials are not allowed on the local machine.
.
Is it some kind of group policy that prevents credentials from being stored with the scheduled task? If so, how to disable it?
AFAIK: /U
and /P
specify the account for which to run schtasks
, whereas /RU
and /RP
specify the account for which the task itself is run.
As seen below, admin
indeed is a member of the Administrators group:
net localgroup administrators
Alias name administrators
Comment Administrators have complete and unrestricted access to the computer/domain
Members
-------------------------------------------------------------------------------
AuraExpressService
di3dh7
admin
The command completed successfully.