task schedule is not working thru GPO

zahid haseeb 41 Reputation points
2021-08-26T12:47:52.593+00:00

I have a powershell script which run fine. I want to deploy the script to machines thru GPO. Below is my configuration. But the endpoint machines are unable to get the schedule tasks
126690-2021-08-26-173215.png

126789-2021-08-26-173228.png

126706-2021-08-26-173243.png126720-2021-08-26-173302.png

Script Details:

$date = Get-Date -Format ddMMMMyyyy
Get-Date >> \tps-bkp\Vyatta\AccessRightsReviews\$date
hostname >> \tps-bkp\Vyatta\AccessRightsReviews\$date
echo " " >> \tps-bkp\Vyatta\AccessRightsReviews\$date
net localgroup administrators >> \tps-bkp\Vyatta\AccessRightsReviews\$date
echo "#######################################" >> \tps-bkp\Vyatta\AccessRightsReviews\$date

Windows for business | Windows Server | User experience | Other
0 comments No comments
{count} votes

8 answers

Sort by: Most helpful
  1. zahid haseeb 41 Reputation points
    2021-08-31T13:39:13.197+00:00

    1- I am able to see the GPO is there. But I am not able to see task in the scheduler.
    2- C:\Windows\system32>dir /s /a /b c:\windows\System32\Tasks | findstr -i accessreview
    C:\Windows\system32>

    C:\Windows\system32>gpresult /r /scope:computer

    Microsoft (R) Windows (R) Operating System Group Policy Result tool v2.0
    c 2013 Microsoft Corporation. All rights reserved.

    Created on 8/31/2021 at 6:26:10 PM

    RSOP data for xxxxxxonline\user01 on machine01 : Logging Mode


    OS Configuration: Member Server
    OS Version: 6.3.9600
    Site Name: Default-First-Site-Name
    Roaming Profile: N/A
    Local Profile: C:\Users\user01
    Connected over a slow link?: No

    COMPUTER SETTINGS

    CN=machine01,OU=CIS,DC=xxxxxxonline,DC=com
    Last time Group Policy was applied: 8/31/2021 at 5:47:51 PM
    Group Policy was applied from:      DC5ME.xxxxxxonline.com
    Group Policy slow link threshold:   500 kbps
    Domain Name:                        xxxxxxonline
    Domain Type:                        Windows 2008 or later
    
    Applied Group Policy Objects
    -----------------------------
        CIS Policy
        Laps Plicy For Server
        Wsus Policy For Servers
        **ISO27001-AccessReview**
        Local Group Policy
    
    The computer is a part of the following security groups
    -------------------------------------------------------
        BUILTIN\Administrators
        Everyone
        BUILTIN\Users
        NT AUTHORITY\NETWORK
        NT AUTHORITY\Authenticated Users
        This Organization
        machine01$
        Domain Computers
        Authentication authority asserted identity
        System Mandatory Level
    

  2. zahid haseeb 41 Reputation points
    2021-08-31T14:32:02.6+00:00

    127975-6.png

    127976-7.png

    I see that the COMPUTER GROUP name CIS COMPUTER GROUP is missing in "The computer is a part of following security group". However, the individual computer is there(coloured)


  3. Alexey Dmitriev 20 Reputation points
    2024-05-02T08:03:11.0133333+00:00

    Unfortunately it looks like scheduled tasks (at least Windows 7) can not be created choosing AD user. NT Authority\System is necessary or nt authority\network service if you need to run script from network share.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.