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 ProcessGroupPolicyExSchedT asks()
2014-12-18 15:08:05.027 [pid=0x20c,tid=0x2334] SOFTWARE\Policies\Microsof t\Windows\ Group Policy\{AADCED64-746C-4633 -A97C-D613 49046527}
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-D 6134904652 7}
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_LINKTRANSITI ON - 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_TRAN SITION - 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_REFRE SH - Forced Refresh is being applied. redo policies.
2014-12-18 15:08:06.012 [pid=0x20c,tid=0x2334] ( ) GPO_INFO_FLAG_SAFEMODE_BOO T - windows safe mode boot flag
2014-12-18 15:08:06.027 [pid=0x20c,tid=0x2334] ( ) GPO_INFO_FLAG_ASYNC_FOREGR OUND - 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={31B2 F340-016D- 11D2-945F- 00C04FB984 F9},CN=Pol icies,CN=S ystem,DC=s earchmojo, DC=local
2014-12-18 15:08:06.027 [pid=0x20c,tid=0x2334] GPT : \\DOMAIN.LOCAL\SYSVOL\DOMA IN.LOCAL\P OLICIES\{3 1B2F340-01 6D-11D2-94 5F-00C04FB 984F9}\MAC HINE
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-0 0C04FB984F 9}
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- 0000000000 00}{CAB545 52-DEEA-46 91-817E-ED 4A4D1AFC72 }][{35378E AC-683F-11 D2-A89A-00 C04FBBCFA2 }{53D6AB1B -2488-11D1 -A28C-00C0 4FB94F17}{ 53D6AB1D-2 488-11D1-A 28C-00C04F B94F17}{D0 2B1F72-340 7-48AE-BA8 8-E8213C67 61F1}][{82 7D319E-6EA C-11D2-A4E A-00C04F79 F83A}{803E 14A0-B4FB- 11D0-A0D0- 00A0C90F57 4B}][{AADC ED64-746C- 4633-A97C- D613490465 27}{CAB545 52-DEEA-46 91-817E-ED 4A4D1AFC72 }][{B1BE8D 72-6EAC-11 D2-A4EA-00 C04F79F83A }{53D6AB1B -2488-11D1 -A28C-00C0 4FB94F17}{ 53D6AB1D-2 488-11D1-A 28C-00C04F B94F17}]
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\G roup Policy\History\{31B2F340-0 16D-11D2-9 45F-00C04F B984F9}\Ma chine\Pref erences\Sc heduledTas ks\Schedul edTasks.xm l
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- D613490465 27}"
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 ProcessGroupPolicyExSchedT asks() returned 0x00000000
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 ProcessGroupPolicyExSchedT
2014-12-18 15:08:05.027 [pid=0x20c,tid=0x2334] SOFTWARE\Policies\Microsof
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-D
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_LINKTRANSITI
2014-12-18 15:08:06.012 [pid=0x20c,tid=0x2334] ( ) GPO_INFO_FLAG_LOGRSOP_TRAN
2014-12-18 15:08:06.012 [pid=0x20c,tid=0x2334] ( ) GPO_INFO_FLAG_FORCED_REFRE
2014-12-18 15:08:06.012 [pid=0x20c,tid=0x2334] ( ) GPO_INFO_FLAG_SAFEMODE_BOO
2014-12-18 15:08:06.027 [pid=0x20c,tid=0x2334] ( ) GPO_INFO_FLAG_ASYNC_FOREGR
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={31B2
2014-12-18 15:08:06.027 [pid=0x20c,tid=0x2334] GPT : \\DOMAIN.LOCAL\SYSVOL\DOMA
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-0
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-
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\G
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-
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 ProcessGroupPolicyExSchedT
Do you have any special characters in your task name?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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.
ASKER
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">*[Syste
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