Windows Server 2012 R2 Optimisation Script

Windows Server 2012 R2 Optimisation Script.

Tested on: Windows Server 2012 R2 build 9600.

Description: This script disables services, disables scheduled tasks and modifies the registry to optimise system performance on Windows Server 2012 R2 running in a Citrix SBC environment.

Note: This script makes changes to the system registry and performs other configuration changes. As such a full backup of the machine or snapshot if running in a virtual environment is strongly recommended. Carry out full testing before introducing the optimised image to production. You should review ALL optimisations this script makes and determine if they fit in to your environment. Not all optimisations will suit all environemnts. To avoid failure, run PowerShell as an administrator before running this script.

Download (click below):

Windows Server 2012 R2 Optimisation Script (4747 downloads)

Any problems with the script or if you want to make your own improvement suggestions then comment below.

Open the script using a text editor or PowerShell ISE to see what exactly the script does.


29 Comments

  • Vista

    January 27, 2018

    Do you have Windows 7 and Windows10 Optimization Script also?

    Reply
    • George Spiers

      January 29, 2018

      No not at this time, I may well do in the future. If you subscribe to the blog you will get notifications for such posts.

      Reply
  • Glenn

    June 28, 2018

    When running this script everything finishes properly, but the network adapter indicator has a red x showing no connections connected. There is a connection, but the Windows 2012r2 “new pc settings” shows no ethernet adapters even though the “network and sharing center” shows a connected adapter.

    Reply
    • George Spiers

      June 30, 2018

      Start the “Windows Connection Manager” service and the icon will show properly.

      Reply
      • Anonymous

        June 30, 2018

        Thank you this worked! Great script. Currently running this with Azure Worker Servers.

        Reply
  • Anonymous

    June 30, 2018

    Thank you this worked! Great script. Currently running this with Azure Worker Servers.

    Reply
    • George Spiers

      July 1, 2018

      Good stuff!

      Reply
  • Ray

    July 1, 2018

    Hey may I have the excel sheet for this as well if you don’t mind?
    Thank you.

    Reply
  • Robert Bartels

    January 18, 2019

    Just downloaded your optimisation script thanks!
    The counter for the downloads doesn’t rises though.

    Keep up the good work!

    Reply
    • George Spiers

      January 25, 2019

      Caching normally prevents the counter from growing, although it is growing in the background. Hope you get use out of the script!

      Reply
  • Pingback: Citrix Windows Server 2012 R2优化脚本 – KB随手记

  • Anonymous

    May 1, 2019

    Just use it!
    Thx a lot George, very helpful, running it to my lab 🙂

    Reply
  • Chet

    May 17, 2019

    Hi George,
    Our Remote Desktop server (Straight/Plain 2012 R2 RDC) is not in any Citrix env however it is on a VMware Host. Do you have any documents that could help me with what lines in the script I would need to modify or remove? Do you have or know a good doc/source to do this with exchange 2013 server as well?
    Thanks.

    Reply
    • George Spiers

      May 17, 2019

      Hello – some people have used the script on plain RDS servers without any issues. I don’t have any specific guides for Exchange 2013 though.

      Reply
  • sayounus

    May 29, 2019

    can i use this script in app layering platform??

    Reply
    • George Spiers

      May 29, 2019

      Yes of course.

      Reply
  • Carlos Pisciolari

    July 3, 2019

    Thanks, Muy Bueno. Muchas Gracias

    Reply
  • John Carmody

    July 25, 2019

    is the dl corrupt? get an extraction error using winzip/winrar/7zip

    Reply
    • George Spiers

      July 26, 2019

      I just tried and it worked.. WinRAR 5.50 (64-bit).

      Reply
  • mike

    October 16, 2019

    Hi there George,
    Windows server 2019 did this script work?
    Thanks.

    Reply
    • George Spiers

      November 3, 2019

      It will work but may not give the full benefits of optimisation as new services etc. have since been released in Server 2019. Make sure to test afterwards.

      Reply
  • Raj

    December 9, 2019

    Hi George,

    Thanks a lot for Win 2012 R2 optimization script. I am using XenApp 7.15 LTSR
    Can we use this script on PVS, DDC 2012 R2 or StoreFront 2012 R2 servers too ? If not, Are there are any articles to optimize the above components ?

    Reply
    • George Spiers

      December 14, 2019

      I’m not sure there is much out there. I never try to optimise those servers personally.

      Reply
  • Rhea

    August 2, 2020

    Thank you. Script works.

    Reply
  • Graham

    May 12, 2021

    Hey George,

    run the script, but its stripped out the background? i don’t see anything that looks to cover the background in the script ? any ideas on how i can restore it ?

    Reply
  • syed

    July 24, 2022

    Not able to download the script, says access denied !
    kindly share the download link.

    Reply
    • George Spiers

      July 24, 2022

      Thanks for letting me know. It is working now.

      Reply
      • Anonymous

        July 26, 2022

        Many thanks for your quick action. Appreciate your contribution

        Reply
  • Graham Mason

    August 31, 2022

    Hey George, are you working on a 2019/2022 optimisation script at all?
    just wondered if its worth waiting or just “adapting” your 2012 one to the bits i “think” are safe to kill off ?

    Reply

Leave a Reply to George Spiers Cancel reply