Link to home
Start Free TrialLog in
Avatar of driscojs
driscojs

asked on

Scheduled Task pushed through Group Policy fails with error: 0x80073a99 The specified query is invalid.

I am trying to setup a Scheduled Task in GP to push out to all our workstations. They are all Win7 or Win8.1, 64-bit, all joined to the domain. The rest of the GPO applies fine, so I know the GPO is running ok (drives get mapped and whatnot).

I created a batch file to reconnect to wifi and restart the VPN, and it works fine when run manually. It also gets copied via the same GPO to the local machine.

I created the scheduled Task a few times, under Computer and under User but nothing seems to stick. I've tried changing the user from administrator, NT Authority\System, and the logged in user. No dice. See the log from the GPO trace below.

Help! :) Thanks!

-Jeff


2014-12-18 15:08:05.012 [pid=0x20c,tid=0x2334] Entering ProcessGroupPolicyExSchedTasks()
2014-12-18 15:08:05.027 [pid=0x20c,tid=0x2334] SOFTWARE\Policies\Microsoft\Windows\Group Policy\{AADCED64-746C-4633-A97C-D61349046527}
2014-12-18 15:08:05.027 [pid=0x20c,tid=0x2334] BackgroundPriorityLevel ( 7 )
2014-12-18 15:08:05.027 [pid=0x20c,tid=0x2334] DisableRSoP ( 0 )
2014-12-18 15:08:05.027 [pid=0x20c,tid=0x2334] LogLevel ( 2 )
2014-12-18 15:08:05.027 [pid=0x20c,tid=0x2334] Command subsystem initialized. [SUCCEEDED(S_FALSE)]
2014-12-18 15:08:06.012 [pid=0x20c,tid=0x2334] ----- Parameters
2014-12-18 15:08:06.012 [pid=0x20c,tid=0x2334] CSE GUID : {AADCED64-746C-4633-A97C-D61349046527}
2014-12-18 15:08:06.012 [pid=0x20c,tid=0x2334] Flags : ( X ) GPO_INFO_FLAG_MACHINE - Apply machine policy rather than user policy
2014-12-18 15:08:06.012 [pid=0x20c,tid=0x2334]         ( X ) GPO_INFO_FLAG_BACKGROUND - Background refresh of policy (ok to do slow stuff)
2014-12-18 15:08:06.012 [pid=0x20c,tid=0x2334]         (   ) GPO_INFO_FLAG_SLOWLINK - Policy is being applied across a slow link
2014-12-18 15:08:06.012 [pid=0x20c,tid=0x2334]         (   ) GPO_INFO_FLAG_VERBOSE - Verbose output to the eventlog
2014-12-18 15:08:06.012 [pid=0x20c,tid=0x2334]         (   ) GPO_INFO_FLAG_NOCHANGES - No changes were detected to the Group Policy Objects
2014-12-18 15:08:06.012 [pid=0x20c,tid=0x2334]         (   ) GPO_INFO_FLAG_LINKTRANSITION - A change in link speed was detected between previous policy application and current policy application
2014-12-18 15:08:06.012 [pid=0x20c,tid=0x2334]         (   ) GPO_INFO_FLAG_LOGRSOP_TRANSITION - A change in RSoP logging was detected between the application of the previous policy and the application of the current policy.
2014-12-18 15:08:06.012 [pid=0x20c,tid=0x2334]         (   ) GPO_INFO_FLAG_FORCED_REFRESH - Forced Refresh is being applied. redo policies.
2014-12-18 15:08:06.012 [pid=0x20c,tid=0x2334]         (   ) GPO_INFO_FLAG_SAFEMODE_BOOT - windows safe mode boot flag
2014-12-18 15:08:06.027 [pid=0x20c,tid=0x2334]         (   ) GPO_INFO_FLAG_ASYNC_FOREGROUND - Asynchronous foreground refresh of policy
2014-12-18 15:08:06.027 [pid=0x20c,tid=0x2334] Token (computer or user SID): S-1-5-18
2014-12-18 15:08:06.027 [pid=0x20c,tid=0x2334] Abort Flag : Yes (0x134c3840)
2014-12-18 15:08:06.027 [pid=0x20c,tid=0x2334] HKey Root : Yes (0x80000002)
2014-12-18 15:08:06.027 [pid=0x20c,tid=0x2334] Deleted GPO List : No
2014-12-18 15:08:06.027 [pid=0x20c,tid=0x2334] Changed GPO List : Yes
2014-12-18 15:08:06.027 [pid=0x20c,tid=0x2334] Asynchronous Processing : Yes
2014-12-18 15:08:06.027 [pid=0x20c,tid=0x2334] Status Callback : No (0x00000000)
2014-12-18 15:08:06.027 [pid=0x20c,tid=0x2334] WMI namespace : Yes (0x056dc080)
2014-12-18 15:08:06.027 [pid=0x20c,tid=0x2334] RSoP Status : Yes (0x04d3eda0)
2014-12-18 15:08:06.027 [pid=0x20c,tid=0x2334] Planning Mode Site : (none)
2014-12-18 15:08:06.027 [pid=0x20c,tid=0x2334] Computer Target : No (0x00000000)
2014-12-18 15:08:06.027 [pid=0x20c,tid=0x2334] User Target : No (0x00000000)
2014-12-18 15:08:06.027 [pid=0x20c,tid=0x2334] Calculated list relevance. [SUCCEEDED(S_FALSE)]
2014-12-18 15:08:06.027 [pid=0x20c,tid=0x2334] ----- Changed - 0
2014-12-18 15:08:06.027 [pid=0x20c,tid=0x2334] Options : (   ) GPO_FLAG_DISABLE - This GPO is disabled.
2014-12-18 15:08:06.027 [pid=0x20c,tid=0x2334]           ( X ) GPO_FLAG_FORCE - Do not override the settings in this GPO with settings in a subsequent GPO.
2014-12-18 15:08:06.027 [pid=0x20c,tid=0x2334] Options (raw) : 0x00000002
2014-12-18 15:08:06.027 [pid=0x20c,tid=0x2334] Version : 8716421 (0x00850085)
2014-12-18 15:08:06.027 [pid=0x20c,tid=0x2334] GPC : LDAP://CN=Machine,CN={31B2F340-016D-11D2-945F-00C04FB984F9},CN=Policies,CN=System,DC=searchmojo,DC=local
2014-12-18 15:08:06.027 [pid=0x20c,tid=0x2334] GPT : \\DOMAIN.LOCAL\SYSVOL\DOMAIN.LOCAL\POLICIES\{31B2F340-016D-11D2-945F-00C04FB984F9}\MACHINE
2014-12-18 15:08:06.027 [pid=0x20c,tid=0x2334] GPO Display Name : Default Domain Policy
2014-12-18 15:08:06.027 [pid=0x20c,tid=0x2334] GPO Name : {31B2F340-016D-11D2-945F-00C04FB984F9}
2014-12-18 15:08:06.027 [pid=0x20c,tid=0x2334] GPO Link : (   ) GPLinkUnknown - No link information is available.
2014-12-18 15:08:06.027 [pid=0x20c,tid=0x2334]            (   ) GPLinkMachine - The GPO is linked to a computer (local or remote).
2014-12-18 15:08:06.027 [pid=0x20c,tid=0x2334]            (   ) GPLinkSite - The GPO is linked to a site.
2014-12-18 15:08:06.027 [pid=0x20c,tid=0x2334]            ( X ) GPLinkDomain - The GPO is linked to a domain.
2014-12-18 15:08:06.027 [pid=0x20c,tid=0x2334]            (   ) GPLinkOrganizationalUnit - The GPO is linked to an organizational unit.
2014-12-18 15:08:06.027 [pid=0x20c,tid=0x2334]            (   ) GP Link Error
2014-12-18 15:08:06.027 [pid=0x20c,tid=0x2334] lParam : 0x00000000
2014-12-18 15:08:06.027 [pid=0x20c,tid=0x2334] Prev GPO : No
2014-12-18 15:08:06.027 [pid=0x20c,tid=0x2334] Next GPO : No
2014-12-18 15:08:06.027 [pid=0x20c,tid=0x2334] Extensions : [{00000000-0000-0000-0000-000000000000}{CAB54552-DEEA-4691-817E-ED4A4D1AFC72}][{35378EAC-683F-11D2-A89A-00C04FBBCFA2}{53D6AB1B-2488-11D1-A28C-00C04FB94F17}{53D6AB1D-2488-11D1-A28C-00C04FB94F17}{D02B1F72-3407-48AE-BA88-E8213C6761F1}][{827D319E-6EAC-11D2-A4EA-00C04F79F83A}{803E14A0-B4FB-11D0-A0D0-00A0C90F574B}][{AADCED64-746C-4633-A97C-D61349046527}{CAB54552-DEEA-4691-817E-ED4A4D1AFC72}][{B1BE8D72-6EAC-11D2-A4EA-00C04F79F83A}{53D6AB1B-2488-11D1-A28C-00C04FB94F17}{53D6AB1D-2488-11D1-A28C-00C04FB94F17}]
2014-12-18 15:08:06.027 [pid=0x20c,tid=0x2334] lParam2 : 0x188116a8
2014-12-18 15:08:06.027 [pid=0x20c,tid=0x2334] Link : LDAP://DC=domain,DC=local
2014-12-18 15:08:06.027 [pid=0x20c,tid=0x2334] Purge GPH : C:\ProgramData\Microsoft\Group Policy\History\{31B2F340-016D-11D2-945F-00C04FB984F9}\Machine\Preferences\ScheduledTasks\ScheduledTasks.xml
2014-12-18 15:08:06.137 [pid=0x20c,tid=0x2334] Read GPE XML data file (1682 bytes total).
2014-12-18 15:08:06.152 [pid=0x20c,tid=0x2334] Properties handled. [ hr = 0x80073a99 "The specified query is invalid." ]
2014-12-18 15:08:06.168 [pid=0x20c,tid=0x2334] Error suppressed. [ hr = 0x80073a99 "The specified query is invalid." ]
2014-12-18 15:08:06.168 [pid=0x20c,tid=0x2334] Completed get next GPO. [SUCCEEDED(S_FALSE)]
2014-12-18 15:08:06.168 [pid=0x20c,tid=0x2334] WQL : SELECT * FROM RSOP_PolmkrSetting WHERE polmkrBaseCseGuid = "{AADCED64-746C-4633-A97C-D61349046527}"
2014-12-18 15:08:06.183 [pid=0x20c,tid=0x2334] Purged 1 old RSoP entries.
2014-12-18 15:08:06.183 [pid=0x20c,tid=0x2334] Logging 1 new RSoP entries.
2014-12-18 15:08:06.183 [pid=0x20c,tid=0x2334] RSoP Entry 0
2014-12-18 15:08:06.199 [pid=0x20c,tid=0x2334] Completed get GPO list. [SUCCEEDED(S_FALSE)]
2014-12-18 15:08:06.199 [pid=0x20c,tid=0x2334] IsRsopPlanningMode() [SUCCEEDED(S_FALSE)]
2014-12-18 15:08:11.613 [pid=0x20c,tid=0x2334] Leaving ProcessGroupPolicyExSchedTasks() returned 0x00000000
Avatar of driscojs
driscojs

ASKER

Here's more info from the gpresult:

Reconnect VPN
Winning GPO      Default Domain Policy
Result: Failure (Error Code: 0x80073a99)
General
Action      Create
Task
Name      Reconnect VPN            
Author      domain\administrator            
Description                  
Run only when user is logged on      InteractiveToken            
UserId      %LogonDomain%\%LogonUser%            
Run with highest privileges      HighestAvailable            
Hidden      No            
Configure for      1.2            
Enabled      Yes            
Triggers
1. On an event                        
Stop task if it runs longer than      30 minutes            
Enabled      Yes            
Subscription      <Select Path="Application">*[System[[Provider[@Name='RasClient'](EventID=20226 or EventID= 20227)]]</Select><Suppress Path="Application">*[System[]]</Suppress>            
Actions
1. Start a program                        
Program/script      c:\users\public\vpn.cmd            
Settings
Stop if the computer ceases to be idle      No            
Restart if the idle state resumes      No            
Start the task only if the computer is on AC power      No            
Stop if the computer switches to battery power      No            
Allow task to be run on demand      Yes            
Stop task if it runs longer than      Immediately            
If the running task does not end when requested, force it to stop      No            
If the task is already running, then the following rule applies      IgnoreNew
Do you have any special characters in your task name?
ASKER CERTIFIED SOLUTION
Avatar of driscojs
driscojs

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I worked around the issue. Links provided by another user I had already seen/used. Issue resolves using Basic triggers instead of custom triggers. The logs I posted contain the query that is failing, and the Basic doesn't have the same issue.