Batch Script – RDS Start Menu Application and Taskbar Shortcut Removal Tool

Customizing or locking down a new server for Remote Desktop Services in a Server 2012 environment can be quite a time consuming and daunting task. Countless hours will be spent setting up Group Policies, testing them, and deploying them. But far worse than that, you will waste massive amounts of time researching for jacked up ways to do simple things, such as unpinning items from the Taskbar and customizing the Start Screen.

In the past, I had already configured a company wide Group Policy for our old 2003 Terminal Server environment and it was simple and easy. No guesswork, no crazy workarounds, shit just worked. The Group Policies covered almost every scenario or task needed to lock down a server but unfortunately, that is not the case any more.

It seems Microsoft has made the process of doing pretty much anything ridiculous and overcomplicated. As a side rant, we (the world) desperetely need a good open source solution for a thin client type environment with something that mimicks Group Policy. I know I’m not the only person out there that would love to give Microsoft the old stink finger once and for all! I for one am tired of sitting and watching companies succumb to the endless money pit that is Microsoft licensing. Where you at Linux Devs?

Anyhow, I decided to write this script for a lot of shortcomings I’ve encountered along the way. One of which that I want to gripe about is that resorting to changing file permissions to remove shortcuts is just plain fucking retarded and redirecting all of the user’s start menus to a network share seemed like massive overkill to an already complicated scenario. On top of that, I had 6 separate Remote Desktop servers to fully setup and configure so I needed to streamline the process a bit. Suprisingly enough, my solution relies solely on batch scripting (and a little makeshift VB).

Enough chit chat, the script is extremely well documented so here are the highlights/features:

  • Removal of the Server Manager and PowerShell links in the Taskbar
  • Ability to backup the All User’s and Default User’s Programs directories to a zip file
  • Ability to copy the All Programs Start Menu shortcuts to a list of administrator or power user profile directories
  • Customized list of applications to remove from the Classic Shell Start Menu or the Windows Start Screen
  • Deleted Start Menu Program entries go into the active user’s Recycle Bin and can be restored if necessary
  • Remove System Tools, Accessories, Accessibility, Administrative Tools, Windows Store, PC Settings, Control Panel, Run, Command Prompt, and PowerShell shortcuts from Menus

Download the “Custom_RDS_Start_Menu.bat” script here.

:: RDS SERVER 2012 CUSTOM START MENU AND TASKBAR SHORTCUT REMOVAL
:: Author: Nathan Thomas
:: Date: 02/11/2015
::
:: This script should be ran on the RDS server after your server administrators have already
:: logged in at least once so that they get all the shortcuts they need (otherwise you will 
:: need to manually copy them later on) but before your end users log in for the first time.
:: In addition, it assumes you have not already made changes or any customizations to the
:: All User's or Default User's Start Menus profiles and that you have already installed all
:: of the applications that the server will be running. Please note that if you decide
:: to install software after you've ran the script, you will manually have to remove that
:: program from the All User's Start Menu folder and copy it to your administrator profiles
 Continue reading "Batch Script – RDS Start Menu Application and Taskbar Shortcut Removal Tool"

Server 2012 – Remove Pinned Items on the Taskbar via Group Policy

I have researched for hours and hours and have looked into numerous different solutions on how to remove pinned items from the taskbar in Server 2012 and have not really found an elegant solution to the problem. Microsoft intentionally made it an extremely ridiculous and convoluted process to be able to add and remove pinned items from the taskbar. I guess it was meant to help prevent it from getting all fuckered up but for christ’s sake, I shouldn’t have to jump through effing hoops just to do such a seemingly rudimentary task.

Part of my particular issue lies in the fact that I’m setting up a completely locked down 2012 RDS environment where the users don’t even have access to the command prompt, powershell, or the ability to run VB scripts. This alone rules out almost every solution out there that I’ve found.

I have even gotten to the point of where I tried using Group Policy Preferences to create a HKCU RunOnce key to run a batch file to delete the necessary files, add the proper registry keys, kill the explorer.exe process, but then I can’t start explorer again without using cmd.exe and I don’t want the user to have to log off and back on again and we can just have a missing shortcut sitting in the freaking taskbar, it confuses people. WTF!!!
Continue reading “Server 2012 – Remove Pinned Items on the Taskbar via Group Policy”

Classic Shell – Remove First Run Wizard with Group Policy

Classic Shell is a necessary evil for any normal Windows user who wants to be able remain productive with introduction of the Start Screen in Server 2012 and Windows 8. As a network administrator, I highly recommend Classic Shell because it even has it’s own Group Policy templates that you can add in with the PolicyDefinitions inside your domain’s SYSVOL folder so you can at least somewhat try to put the Start Menu back to the way it once was. The Start Screen is a technical support person’s worst nightmare for novice users who don’t deal well with change (and trust me they don’t).

If you’re trying to customize a Remote Desktop Server environment, one somewhat annoying thing you will run into is trying to get rid of the first run wizard for Classic Shell. Obviously, the first run wizard is handy for anybody who wants to customize the look and feel of their Start Menu, but more than likely in a Remote Desktop environment, you’re going to want all this predefined with no user interaction so the chances of them screwing things up is slim to none.
Continue reading “Classic Shell – Remove First Run Wizard with Group Policy”

Windows 8/Server 2012 – Install A Theme for All Users

On Windows 7, 8, and Server 2012, themes can be downloaded from Microsoft here and are typically installed on a per user basis in the following directory:

%localappdata%\Microsoft\Windows\Themes

To install a .themepack file for all users, it requires a bit of manual intervention. Today when searching for the answer, I found this perfect blog article that explains exactly how to do it so there’s no real point in re-writing it all verbatim here.
Continue reading “Windows 8/Server 2012 – Install A Theme for All Users”