Solved

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

Posted on 2014-12-18
5
600 Views
Last Modified: 2014-12-24
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
0
Comment
Question by:driscojs
  • 3
5 Comments
 

Author Comment

by:driscojs
ID: 40507869
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
0
 
LVL 8

Expert Comment

by:nader alkahtani
ID: 40507954
0
 
LVL 6

Expert Comment

by:JeffG2583
ID: 40508155
Do you have any special characters in your task name?
0
 

Accepted Solution

by:
driscojs earned 0 total points
ID: 40509086
I didn't solve it, but I did work around it. I was using a custom trigger, and it had two events in it, both from RasClient. When I switched back to Basic triggers, I just put two triggers in, one for each event id. That works. Also, FYI, I set up the task under the User GPO, using the default %LogonDomain%\%LogonUser%. Works fine this way so I'm sticking with this.

-Jeff
0
 

Author Closing Comment

by:driscojs
ID: 40516246
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.
0

Featured Post

Promote certifications in your email signature

Has your company recently won an award or achieved a certification? They'll no doubt want to show it off. Email signature images used to promote certifications & awards can instantly establish credibility with a recipient and provide you with numerous benefits.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
Know what services you can and cannot, should and should not combine on your server.
This tutorial will walk an individual through locating and launching the BEUtility application and how to execute it on the appropriate database. Log onto the server running the Backup Exec database. In a larger environment, this would generally be …
This tutorial will walk an individual through the steps necessary to configure their installation of BackupExec 2012 to use network shared disk space. Verify that the path to the shared storage is valid and that data can be written to that location:…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now