Jump to content

Recommended Posts

Posted (edited)

Ok so I'm trying to deploy a scheduled task but having some difficulty. It's basically to shut down PCs at night. Here are some screen grabs of the preference settings. If some one who has this working and can spot any anomaly that'd be great.

 

 

General.png Triggers.png Actions.png Conditions.png Settings.png Common.png

 

The error message reported in Event viewer..

 

Event error.png

 

"The user 'Shutdown 22:00' preference item in the 'M6 testing {00A3C49F-1B6A-4644-BF99-7AE5BB327531}' Group Policy object did not apply because it failed with error code '0x8007007b The filename, directory name, or volume label syntax is incorrect.' This error was suppressed."

 

---

I've tried changing a lot of the syntax of the Action, removing the variables, Just can't seem to get the scheduled task created. The path there does point to shutdown.exe on the client and I've also manually created the task and it ran with no problems.

 

I've also pulled this out of all other OUs so the only policies applying are the "M6 Testing" and default domain policy (a very Spartan policy)

 

Tried as a computer and user preference

 

Only been logging on as a domain Admin during testing.

 

I've encountered this error while trying to get printers deployed via GPP too and never got a solution (had to stick with scripts for now).

 

Currently some GPP do apply, like start menus, registry settings and shortcuts all currently in use in the live environment.

 

All clients are windows 7 which I assume then GPP CSE are installed by default and running ok, I've not explored this but I'm starting to think that might be something to look at, not sure if CSE is needed for all the preferences or just some of them (the ones I'm having trouble with maybe?)

 

I also enabled gpp scheduled task logging (computer policy system/group policies/logging)

 

Here is the log. There's actually 3 tasks that should be created.

 

11-16 09:12:02.556 [pid=0x3b0,tid=0xdec] Entering ProcessGroupPolicyExSchedTasks()

2011-11-16 09:12:02.560 [pid=0x3b0,tid=0xdec] SOFTWARE\Policies\Microsoft\Windows\Group Policy\{AADCED64-746C-4633-A97C-D61349046527}

2011-11-16 09:12:02.562 [pid=0x3b0,tid=0xdec] BackgroundPriorityLevel ( 0 )

2011-11-16 09:12:02.564 [pid=0x3b0,tid=0xdec] DisableRSoP ( 0 )

2011-11-16 09:12:02.566 [pid=0x3b0,tid=0xdec] LogLevel ( 2 )

2011-11-16 09:12:02.568 [pid=0x3b0,tid=0xdec] Command subsystem initialized. [sUCCEEDED(S_FALSE)]

2011-11-16 09:12:02.616 [pid=0x3b0,tid=0xdec] Background priority set to 0 (Idle).

2011-11-16 09:12:02.618 [pid=0x3b0,tid=0xdec] ----- Parameters

2011-11-16 09:12:02.620 [pid=0x3b0,tid=0xdec] CSE GUID : {AADCED64-746C-4633-A97C-D61349046527}

2011-11-16 09:12:02.622 [pid=0x3b0,tid=0xdec] Flags : ( ) GPO_INFO_FLAG_MACHINE - Apply machine policy rather than user policy

2011-11-16 09:12:02.624 [pid=0x3b0,tid=0xdec] ( X ) GPO_INFO_FLAG_BACKGROUND - Background refresh of policy (ok to do slow stuff)

2011-11-16 09:12:02.625 [pid=0x3b0,tid=0xdec] ( ) GPO_INFO_FLAG_SLOWLINK - Policy is being applied across a slow link

2011-11-16 09:12:02.627 [pid=0x3b0,tid=0xdec] ( ) GPO_INFO_FLAG_VERBOSE - Verbose output to the eventlog

2011-11-16 09:12:02.628 [pid=0x3b0,tid=0xdec] ( ) GPO_INFO_FLAG_NOCHANGES - No changes were detected to the Group Policy Objects

2011-11-16 09:12:02.629 [pid=0x3b0,tid=0xdec] ( ) GPO_INFO_FLAG_LINKTRANSITION - A change in link speed was detected between previous policy application and current policy application

2011-11-16 09:12:02.631 [pid=0x3b0,tid=0xdec] ( ) 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.

2011-11-16 09:12:02.632 [pid=0x3b0,tid=0xdec] ( X ) GPO_INFO_FLAG_FORCED_REFRESH - Forced Refresh is being applied. redo policies.

2011-11-16 09:12:02.634 [pid=0x3b0,tid=0xdec] ( ) GPO_INFO_FLAG_SAFEMODE_BOOT - windows safe mode boot flag

2011-11-16 09:12:02.635 [pid=0x3b0,tid=0xdec] ( ) GPO_INFO_FLAG_ASYNC_FOREGROUND - Asynchronous foreground refresh of policy

2011-11-16 09:12:02.637 [pid=0x3b0,tid=0xdec] Token (computer or user SID): S-1-5-21-1037851856-2007117648-2118856591-500

2011-11-16 09:12:02.639 [pid=0x3b0,tid=0xdec] Abort Flag : Yes (0x0163c6d0)

2011-11-16 09:12:02.641 [pid=0x3b0,tid=0xdec] HKey Root : Yes (0x00000ad8)

2011-11-16 09:12:02.643 [pid=0x3b0,tid=0xdec] Deleted GPO List : No

2011-11-16 09:12:02.645 [pid=0x3b0,tid=0xdec] Changed GPO List : Yes

2011-11-16 09:12:02.647 [pid=0x3b0,tid=0xdec] Asynchronous Processing : Yes

2011-11-16 09:12:02.650 [pid=0x3b0,tid=0xdec] Status Callback : No (0x00000000)

2011-11-16 09:12:02.652 [pid=0x3b0,tid=0xdec] WMI namespace : Yes (0x04530e40)

2011-11-16 09:12:02.654 [pid=0x3b0,tid=0xdec] RSoP Status : Yes (0x05b1fc14)

2011-11-16 09:12:02.656 [pid=0x3b0,tid=0xdec] Planning Mode Site : (none)

2011-11-16 09:12:02.658 [pid=0x3b0,tid=0xdec] Computer Target : No (0x00000000)

2011-11-16 09:12:02.660 [pid=0x3b0,tid=0xdec] User Target : No (0x00000000)

2011-11-16 09:12:02.663 [pid=0x3b0,tid=0xdec] Calculated list relevance. [sUCCEEDED(S_FALSE)]

2011-11-16 09:12:02.665 [pid=0x3b0,tid=0xdec] ----- Changed - 0

2011-11-16 09:12:02.667 [pid=0x3b0,tid=0xdec] Options : ( ) GPO_FLAG_DISABLE - This GPO is disabled.

2011-11-16 09:12:02.669 [pid=0x3b0,tid=0xdec] ( ) GPO_FLAG_FORCE - Do not override the settings in this GPO with settings in a subsequent GPO.

2011-11-16 09:12:02.672 [pid=0x3b0,tid=0xdec] Options (raw) : 0x00000000

2011-11-16 09:12:02.674 [pid=0x3b0,tid=0xdec] Version : 4849738 (0x004a004a)

2011-11-16 09:12:02.676 [pid=0x3b0,tid=0xdec] GPC : LDAP://CN=User,cn={00A3C49F-1B6A-4644-BF99-7AE5BB327531},cn=policies,cn=system,DC=kirkbiekendal,DC=cumbria,DC=sch,DC=uk

2011-11-16 09:12:02.678 [pid=0x3b0,tid=0xdec] GPT : \\kirkbiekendal.cumbria.sch.uk\SysVol\kirkbiekendal.cumbria.sch.uk\Policies\{00A3C49F-1B6A-4644-BF99-7AE5BB327531}\User

2011-11-16 09:12:02.680 [pid=0x3b0,tid=0xdec] GPO Display Name : M6 testing

2011-11-16 09:12:02.682 [pid=0x3b0,tid=0xdec] GPO Name : {00A3C49F-1B6A-4644-BF99-7AE5BB327531}

2011-11-16 09:12:02.684 [pid=0x3b0,tid=0xdec] GPO Link : ( ) GPLinkUnknown - No link information is available.

2011-11-16 09:12:02.686 [pid=0x3b0,tid=0xdec] ( ) GPLinkMachine - The GPO is linked to a computer (local or remote).

2011-11-16 09:12:02.688 [pid=0x3b0,tid=0xdec] ( ) GPLinkSite - The GPO is linked to a site.

2011-11-16 09:12:02.689 [pid=0x3b0,tid=0xdec] ( ) GPLinkDomain - The GPO is linked to a domain.

2011-11-16 09:12:02.691 [pid=0x3b0,tid=0xdec] ( X ) GPLinkOrganizationalUnit - The GPO is linked to an organizational unit.

2011-11-16 09:12:02.694 [pid=0x3b0,tid=0xdec] ( ) GP Link Error

2011-11-16 09:12:02.696 [pid=0x3b0,tid=0xdec] lParam : 0x00000000

2011-11-16 09:12:02.698 [pid=0x3b0,tid=0xdec] Prev GPO : No

2011-11-16 09:12:02.700 [pid=0x3b0,tid=0xdec] Next GPO : No

2011-11-16 09:12:02.702 [pid=0x3b0,tid=0xdec] Extensions : [{00000000-0000-0000-0000-000000000000}{CAB54552-DEEA-4691-817E-ED4A4D1AFC72}][{AADCED64-746C-4633-A97C-D61349046527}{CAB54552-DEEA-4691-817E-ED4A4D1AFC72}]

2011-11-16 09:12:02.703 [pid=0x3b0,tid=0xdec] lParam2 : 0x088d898c

2011-11-16 09:12:02.705 [pid=0x3b0,tid=0xdec] Link : LDAP://OU=test,DC=kirkbiekendal,DC=cumbria,DC=sch,DC=uk

2011-11-16 09:12:02.722 [pid=0x3b0,tid=0xdec] RunOnce value created [sUCCEEDED(S_FALSE)]

2011-11-16 09:12:02.727 [pid=0x3b0,tid=0xdec] Read GPE XML data file (4955 bytes total).

2011-11-16 09:12:02.730 [pid=0x3b0,tid=0xdec] RunOnce value created [sUCCEEDED(S_FALSE)]

2011-11-16 09:12:02.738 [pid=0x3b0,tid=0xdec] Properties handled. [ hr = 0x8007007b "The filename, directory name, or volume label syntax is incorrect." ]

2011-11-16 09:12:02.746 [pid=0x3b0,tid=0xdec] Error suppressed. [ hr = 0x8007007b "The filename, directory name, or volume label syntax is incorrect." ]

2011-11-16 09:12:02.809 [pid=0x3b0,tid=0xdec] Properties handled. [ hr = 0x8007007b "The filename, directory name, or volume label syntax is incorrect." ]

2011-11-16 09:12:02.818 [pid=0x3b0,tid=0xdec] Error suppressed. [ hr = 0x8007007b "The filename, directory name, or volume label syntax is incorrect." ]

2011-11-16 09:12:02.884 [pid=0x3b0,tid=0xdec] Properties handled. [ hr = 0x8007007b "The filename, directory name, or volume label syntax is incorrect." ]

2011-11-16 09:12:02.892 [pid=0x3b0,tid=0xdec] Error suppressed. [ hr = 0x8007007b "The filename, directory name, or volume label syntax is incorrect." ]

2011-11-16 09:12:02.901 [pid=0x3b0,tid=0xdec] Completed get next GPO. [sUCCEEDED(S_FALSE)]

2011-11-16 09:12:02.904 [pid=0x3b0,tid=0xdec] WQL : SELECT * FROM RSOP_PolmkrSetting WHERE polmkrBaseCseGuid = "{AADCED64-746C-4633-A97C-D61349046527}"

2011-11-16 09:12:02.944 [pid=0x3b0,tid=0xdec] Purged 3 old RSoP entries.

2011-11-16 09:12:02.946 [pid=0x3b0,tid=0xdec] Logging 3 new RSoP entries.

2011-11-16 09:12:02.952 [pid=0x3b0,tid=0xdec] RSoP Entry 0

2011-11-16 09:12:02.969 [pid=0x3b0,tid=0xdec] RSoP Entry 1

2011-11-16 09:12:02.985 [pid=0x3b0,tid=0xdec] RSoP Entry 2

2011-11-16 09:12:02.998 [pid=0x3b0,tid=0xdec] Completed get GPO list. [sUCCEEDED(S_FALSE)]

2011-11-16 09:12:03.007 [pid=0x3b0,tid=0xdec] Leaving ProcessGroupPolicyExSchedTasks() returned 0x00000000

 

SOLVED

Invalid.png

Would be nice if that pop up appeared when creating scheduled tasks in GPO.

 

 

Thanks for the help

Edited by Finch7
SOLVED
  • Thanks 1
Posted (edited)

Does the user backup have enough rights to shutdown the pc? Maybe test this with a special shutdown account, wich has enough rights on the local machine?

Maybe try the option: Run with highest privilege

Edited by Kogelkopper
Posted
Does the user backup have enough rights to shutdown the pc? Maybe test this with a special shutdown account, wich has enough rights on the local machine?

Maybe try the option: Run with highest privilege

 

Problem is the task is not creating in the first place. To answer your question though, I set this up manually (exact same settings including run as user) and it works fine. What I need is for the task to be setup automatically.

Posted
No I started this thread in the hope of solving the GPP issue not to work around it. I have work arounds already. GPP could effectively replace all scripts and that would be useful but need to work out this issue, which as I mentioned I also encountered with the printer part of GPP.
Posted

Finch,

 

Can you check if the following works: replace the %systemroot%\system32\shutdown.exe with C:\Windows\System32\shutdown.exe in the program script area and remove %systemroot%\system32 and leave it (blanc).

And test again?

Posted
Yep tried that (and again just now to double check) and numerous other permutations. I really don't think it's syntax related any more. Especially as I can manually create the same job with the same syntax and run it successfully.
Posted

Thanks but you may want to hold off.

 

the ":" character is not allowed in names. When you create the task through gpo it doesn't care to inform you that nor does any of the reams of documents I ploughed through.

 

It's only just now when I tried recreating the job again manually, to the exact detail including name it tells me.

 

Thanks for your efforts people.

Posted

What about using the schtasks in the cmd, ok you might have a very big file to cover all your computers on your network:

 

schtasks /create /S /U domain\username /P password /sc DAILY /tn SystemShutdown /tr "%systemroot%\system32\shutdown.exe -s -t 10 -f" /ru System /mo 1 /st 20:00:00

 

This will (should) set up a task on the computer to run as SYSTEM to turn the PC off at 8pm

 

Or if you can run the it in a logon script use:

schtasks /create /sc DAILY /tn SystemShutdown /tr "%systemroot%\system32\shutdown.exe -s -t 10 -f" /ru System /mo 1 /st 20:00:00

 

But the user who logs on will need to be able to set up a scheduled task.

 

Rob

  • 5 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



  • 33 When would you like EduGeek EDIT 2025 to be held?

    1. 1. Select a time period you can attend


      • I can make it in June\July
      • I can make it in August\Sept
      • Other time period. Comment below
      • Either time

×
×
  • Create New...