none
Preferences - scheduled task. Getting access denied error.

    Question

  • HI, I'm trying to deploy a scheduled task with GP Preferences. I'm trying to set it with "Run whether user is logged on or not". My scheduled task wont LOAD to the PC, getting access denied error.

    My setting:

    I trying to run a batch file to reboot the machine once a week. No matter if the user is logged on or not.

    I set the option "Run whether user is logged on or not", but when I do that, the "Do not store password. ext." option is automatically greyed out. I tried using a batch file from a share and from the local machine.

    Error: The computer 'Reboot8' preference item in the 'Preferences Policy {FE6B837F-B00A-43EA-AF4E-CBECEC71D3B7}' Group Policy object did not apply because it failed with error code '0x80070005 Access is denied.' This error was suppressed.

    It will load if I select "Run only when user is logged on".


    I have a Win 8.1 Pro machine and I'm trying to deploy it to Win 7 Pro x64.
    • Edited by gthegreat1 Wednesday, December 31, 2014 10:05 PM
    Wednesday, December 31, 2014 9:55 PM

Answers

  • Hi,

    >>I set the option "Run whether user is logged on or not", but when I do that, the "Do not store password. ext." option is automatically greyed out. I tried using a batch file from a share and from the local machine.

    I reproduced this in my lab and met the same issue with yours. I fixed the issue by changing the user account for running the task to NT AUTHORITY\SYSTEM, and meanwhile, I checked the option Run with highest privileges.

    Best regards,

    Frank Shen


    Friday, January 02, 2015 10:29 AM
    Moderator

All replies

  • Are you able to see the GPO applied on the client machine ?
    Friday, January 02, 2015 9:47 AM
  • Hi,

    >>I set the option "Run whether user is logged on or not", but when I do that, the "Do not store password. ext." option is automatically greyed out. I tried using a batch file from a share and from the local machine.

    I reproduced this in my lab and met the same issue with yours. I fixed the issue by changing the user account for running the task to NT AUTHORITY\SYSTEM, and meanwhile, I checked the option Run with highest privileges.

    Best regards,

    Frank Shen


    Friday, January 02, 2015 10:29 AM
    Moderator
  • It worked. Thank you.

    The scheduled task loaded. I tried it with a local batch file and a network batch file.

    Now I have to test and see if the batch will run.

    I would appreciate if you can explain to me why it worked, or post a link to an article that might explain something.

    Friday, January 02, 2015 2:50 PM
  • You got it exactly!

    I was having the same issue. I was running task as a service domain admin account that we use to run a lot of domain services.

    After a GPUPDATE /FORCE 

    Event Viewer was showing event ID 4098 The computer 'Restart After Updates when Required' preference item in the 'Production Server Policy (policy having trouble)' Group Policy Object did not apply because it failed with error code '0x80070005 Access is denied.' This error was suppressed.

    I checked in the AD GP central store %systemroot%\SYSVOL\domain\policies\'policy having trouble' permissions and it included domain admins.

    You think everything is okay but it gets the permission error.

    Changed the credentials to run as NT AUTHORITY\SYSTEM and everything works... weird.

    Thanks for the fix Frank!

    Tuesday, November 24, 2015 5:24 PM
  • I tried it with ... a network batch file.

    Now I have to test and see if the batch will run.

    Hey,

    I know this thread is two years old now, but was NT AUTHORITY\SYSTEM able to see the network batch file? I'm encountering a similar issue at the moment. I want ~200 PCs to be able to read the file from a network share instead of distributing it to each of them.

    Tuesday, January 10, 2017 10:09 AM