Friday, April 11, 2014

Disable Automatic Maintenance in Windows Server 2012 R2

Automatic Maintenance in Windows Server 2012 R2 is very resource intensive process. Even though it might be scheduled to run in the middle of the night, the process may continues running throughout the day. This can severely impact the performance of the system.

The following instructions will disable the Automatic Maintenance in Windows Server 2012 R2. I found the instructions from the post by Lars Jørgensen and this blog.

Disclaimer: Not sure if disabling the Automatic Maintenance will disable Windows Updates too. Apply the steps at YOUR OWN RISK and PERIL.

  1. You will need the PsExec command from here.
  2. Open a command prompt in Administrator mode.
  3. Run this command (if you are on the local server, you can skip the \\SERVERNAME parameter):
  4. psexec \\SERVERNAME -s schtasks /change /tn “\Microsoft\Windows\TaskScheduler\Maintenance Configurator” /DISABLE

  5. You will receive a SUCCESS notification from the command ran above if all went well.

  6. Check it in your Task Scheduler. It should look like below:
    image

  7. Done

That should reduce some server performance headache. Good Luck!!!

Thursday, March 13, 2014

Apply alternate background colors to Group headers


The instruction below is for one group header. But it can be easily extended for use with multiple group headers.

  1. Create a group in the report.
  2. At the Report level, select the Script tab.
  3. Set iRow = 0 in initialize() method of the report. “iRowcould be any variable name.
    image
  4. Return to the Layout tab of report and select the Group header row (where you want to apply style).
  5. Click on Script tab. Select onRender from Script drop down
  6. Enter the script below:
    if (iRow == 0) {
            this.getStyle().backgroundColor = "silver";
            iRow = 1;
    }  else {
            this.getStyle().backgroundColor = "white";
            iRow = 0;
    }

    image
  7. Done. Preview the report to see the changes.