Tuesday, November 27, 2012

Deploy Windows 8 Start Tiles Using Group Policy Preferences

I've already written about creating custom shortcuts to do things like "Shutdown" and "Restart" on the Desktop and Start screen for Windows 8 and Windows Server 2012 systems.  But I'm a HEE-YOOOOOOOOOOOGE (aka:  really big) fan of Group Policy and Group Policy Preferences in particular. And since I like to leverage things Microsoft provides for free, this is a win-win.

How to Do It...


  1. Create a new Group Policy Object (GPO)
    1. I named it "Desktop Shortcuts"
  2. Edit the Computer Preferences to add the shortcuts to the "All Users Start Menu"
    1. Expand Computer Configuration / Preferences / Windows Settings
      1. Click on Shortcuts
      2. Right-click Shortcuts, and select New / Shortcut
      3. For this example, I entered the "shutdown.exe" command with the arguments "-r -f -t 10" to force a Restart after a 10-second delay. (see Figure 1)
      4. (Optional) You could also set the shortcut icon to use the standard red power symbol (see Figure 3).
      5. Close the Group Policy Management Editor
  3. Link the GPO to the Organizational Unit (OU) where the computers reside.
Figure 1 - Group Policy settings
Figure 2 - Start screen result ("Restart 10" tile)
The end result will depend on whether you apply this to Windows 8 / Windows Server 2012 systems ONLY, or include older versions of Windows.  For all Windows Vista, Windows 7 and Windows 8 systems (and corresponding Server versions) it will add a shortcut to the Start Menu.  But on Windows 8 and Windows Server 2012 systems it will also add it as a Tile to the Start screen (aka "Metro" interface).

Figure 3 - Shortcut itself

When It Doesn't Work

If the target item isn't found, Group Policy will abort the shortcut creation and move on to the next setting.  You can verify this by looking in the Windows Event log:
  1. Open Windows Event Viewer
  2. Expand the Application log
  3. Search for event ID 4098 (has a severity Level of "Warning")
  4. The text in the body of the event will describe what failed.  The example below shows I tried to create a shortcut named "Bogus Shortcut" that tries to refer to a "fubar.exe" which wasn't found on the target computer...
Description:
The computer 'Bogus Shortcut' preference item in the 'U - Desktop Shortcuts {E69E2B0E-6026-4FB1-86E0-30B67CC61CE1}' Group Policy Object did not apply because it failed with error code '0x80070002 The system cannot find the file specified.' This error was suppressed.

Summary

This works well as long as the shortcuts refer to things which are part of your standard server environment.  In other words, standard Windows commands or standard add-ons or third-party items, which are present on every system where you intend to apply this approach.  Good luck!  As always:  Test, Test, Test!

No comments: