ERROR:
You're getting a 0x80070005 (E_ACCESSDENIED) trying to create a scheduled task.
SOLUTION:
This error code means you are getting 'access denied' when trying to create a scheduled task. This is usually due to incorrect permissions on the TASKS folder itself. It can also be caused by a local security policy or group policy restricting the creation of scheduled tasks.
---
How to Check the Permissions on the TASKS folder:
1. Browse to C:\Windows\
2. Right-click the Tasks folder and select Properties
3. Go to the Security tab
4. Make sure all users have FULL CONTROL (or at least anyone needing to schedule)
5. Also do the same steps 2-4 on the C:\Windows\System32\ Tasks folder.
---
Also Verify the Group Policy for Restrictions:
1. Within the group policy management interface, browse to Computer Configuration | Administrative Templates | Windows Components | Task Scheduler
For more information see this Microsoft KB article:
https://technet.microsoft.com/library/Cc940083