Windows 10 1709 Optimisation Script

Windows 10 1709 Optimisation Script.

Tested on: Windows 10 1709 (up to build 16299.785)

Description: This script disables services, disables scheduled tasks and modifies the registry to optimise system performance on Windows 10 1709 running in a Citrix VDI 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 and make sure you are using the 64-bit version of PowerShell.

Download (click below):

Windows 10 1709 Optimisation Script (2819 downloads)

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

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


39 Comments

  • Nick Panaccio

    July 2, 2018

    One thing that’s worth noting – If you use a custom Start layout for Windows 10, and have Internet Explorer in that file pinned using the following line:

    Then you will need to remove line 65 from this script:

    (“StubPath – Web Platform Customizations.”,”‘HKLM\SOFTWARE\Microsoft\Active Setup\Installed Components\{89820200-ECBD-11cf-8B85-00AA005B4383}’ /v StubPath /f”),

    Active Setup is required to create that IE shortcut at user logon.

    Reply
    • Nick Panaccio

      July 2, 2018

      Looks like the code got scrubbed. This is the line I reference above, from the Start layout XML file:

      DesktopApplicationTile Size=”1×1″ Column=”0″ Row=”0″ DesktopApplicationID=”Microsoft.InternetExplorer.Default”

      Reply
      • George Spiers

        July 3, 2018

        Thanks Nick – I have a custom Start Menu and Taskbar XML file defined which pins IE fine without removing line 65 from the script. I guess it depends on what way you are defining your XML file.

        Reply
        • Nick Panaccio

          July 5, 2018

          Interesting. Are you using the line I posted above for the IE shortcut, where it utilizes Active Setup? That’s the whole issue for me. I see others using “%APPDATA%\Microsoft\Windows\Start Menu\Programs\Accessories\Internet Explorer.lnk”. As for defining the XML file, I’m applying it via GPO.

          Reply
          • George Spiers

            July 8, 2018

            No I don’t use that line, I have “%ALLUSERSPROFILE%\Microsoft\Windows\Start Menu\Programs\Accesories\Internet Explorer.lnk” defined in the XML file and applied via GPO.

  • HL

    August 15, 2018

    Hi

    I’m like to run skype for business in my VDI, but for some strange reason the citrix HDX realtime media engine wouldn’t start. Is it possible that your script disables services that skype for business needs or change some settings? I have installed skype for business in may other citrix installation without any big problem. But it’s the first time i use this optimisation script.

    Do you have an undo script?

    Kind regards

    Reply
    • George Spiers

      August 15, 2018

      The RTME runs on the endpoint, so the script would not affect that. I use the optimisation script on W10 with SfB RTOP and it works fine.

      Reply
  • Reddy

    August 23, 2018

    Hi George,

    I have applied your script on W10 and then created vDisk. Now we were able to login into W10 pooled VDI in 2 min. Is this normal ? are we still have option to reduce the logon time ? Also after executing your script. I have noticed D drive recycle bin corrupted. We are using D drive as Write cache drive.

    The Recycle Bin on D:\ is corrupted. Do you want to empty the Recycle Bin for this drive?
    [Yes] [No]

    Reply
    • George Spiers

      August 23, 2018

      Not normal, I use the script with less logon time than that. Did you run the script whilst the D:\ drive was connected? The script doesn’t touch anything to do with the Recycle Bin so not sure what has caused that. What actions do you take to get that message?

      Reply
  • Heather

    August 31, 2018

    I am testing this optimization script on a Windows 10 x64 1803 os image and am having problems with the start menu search functionality breaking after running the script and restarting. I removed the disable Cortana registry entry, but the behavior is the same. Do you have any suggestions on what part of the script could be causing this? Thanks.

    Reply
    • George Spiers

      October 26, 2018

      Does it happen straight away? Can you replicate it every time or only sometimes does it break?

      Reply
  • Steve

    September 18, 2018

    Couple of quick questions…

    – Does this do everything plus more that the Citrix optimization templates; Windows 1709 and VDI supplemental do?

    – Is it possible to rollback the uninstall of the appx applications and reinstall using Powershell commands and if so what are the Powershell commands required?

    Thanks…

    Reply
  • Ravindar

    September 21, 2018

    Hi George,

    I have run the script on Master image and once we deploy pooled VDI’s.

    We don’t see few mandatory windows apps like Calculator, Sticky notes and Windows Photos.

    Tried to install in image and promoted, however its not reflecting to users when then login to VDI’s.

    Can you please help us to install mentioned apps to all users.
    Thanks..

    Reply
    • George Spiers

      September 24, 2018

      Calculator and Sticky Notes are actually not removed by the script, are you saying that they seem to be?
      Are you using CPM?

      Reply
      • Ravindar

        October 26, 2018

        Yes, they seemed to be removed and we are using Citrix UPM for profile roaming.

        Reply
        • Nick Panaccio

          October 26, 2018

          Do you see those apps when a user first logs into their desktop with a brand new Citrix profile? If so, have you tried adding “AppData\Local\Packages” to the “Folders to Mirror” setting, and removing it from the default exclusion?

          Reply
          • George Spiers

            October 26, 2018

            That will be the problem, it is a known issue.

          • Ravindar

            October 28, 2018

            Hi Nick

            thanks for your reply

            No i don’t see packages folder even in the first logon, i have reinstalled all those apps though they are visible only with our Admin ID(where we have installed) but not loading with any other user profile.

            I have tried with RDP by disabling Citrix UPM as well but still same.

          • Ravindar

            October 28, 2018

            Correcting my comments.

            Hi Nick

            thanks for your reply

            No i don’t see sticky notes and Calculator packages in the “Appdata\Local\packages” folder even in the first logon, i have reinstalled all those apps though they are visible only with our Admin ID(where we have installed) and see packaged as well in Appdata\Local\Packages folder but not loading with any other user profile.

            I have tried with RDP by disabling Citrix UPM as well but still same.

          • George Spiers

            October 28, 2018

            The script does not remove Calculator or Sticky Notes, so something else is causing it.

  • sunny

    October 26, 2018

    It breaks everything like start menu and doesnt let the image load the user layer.. is there anybody facing the similar issue?

    Reply
    • George Spiers

      October 26, 2018

      So after you apply the script it breaks the Start Menu straight away for all users? What version of Windows 10 did you run this on.

      Reply
      • Sudha

        October 26, 2018

        Hi George.. Thank you for the response it doesn’t break anything in Platform layer but when i publish the template with version of optumized platform layer its breaks the start menu and for some reason i cannot Launch the ica session even though machines are registered when i do console to then i cannot access cmd or powershell from console. thanks

        Reply
  • Sunny

    October 26, 2018

    Hi George.. Thank you for the response it doesn’t break anything in Platform layer but when i publish the template with version of optumized platform layer its breaks the start menu and for some reason i cannot Launch the ica session even though machines are registered when i do console to then i cannot access cmd or powershell from console. thanks

    Reply
    • George Spiers

      October 26, 2018

      Have you created a Platform Layer with just the script run versus one without? Need to narrow down the issue. Also what W10 version?

      Reply
      • sunny

        October 26, 2018

        Yes created the new version ran your script and added the new version to the template.
        Windows 10 1709. Also somehow network icon shows red X on it after image boots up.

        Reply
        • George Spiers

          October 26, 2018

          What version of App Layering?
          Also are you using Citrix Profile Management?

          Reply
          • Sunny

            October 26, 2018

            4.14 and yes i am using upm in our environment.
            Now i just used od layer and platform layer optimized with your script and same thing is happening.

            I guess i have to breakdown the script and run in phases to figure the issue.

  • Stefan

    October 30, 2018

    Hi and thanks for your script.
    But i used it recently on a Microsoft Surface Pro (2017) and now im stuck in airplane mode and its grayed out.
    none of the solutions i found will help.
    do you have any idea what could cause the trouble?
    Thanks in advance

    Reply
    • George Spiers

      October 31, 2018

      The script was designed for Windows 10 VDI virtual machines. You will need to roll-back the changes, I can send a spreadsheet if you need, or you can open the script itself to see what it does and revert.

      Reply
  • Ray

    November 8, 2018

    Hey George was curious if Sunny figured out if this was causing him issues in app layering? May I have the spread sheet please.
    Also does this remove active setup locations
    HKEY_LOCAL_MACHINE\Software\Microsoft\Active Setup\Installed Components” & HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\ Active Setup\Installed Components

    Reply
    • George Spiers

      November 8, 2018

      Sent. Not sure not heard from Sunny. I have used the script on App Layering and non-App Layering without the same problem, I haven’t managed to perform my own testing on App Layering 4.14.

      Reply
  • Ray

    November 8, 2018

    Thanks George, I appreciate all the help you provide.

    Reply
    • George Spiers

      November 8, 2018

      You’re welcome!

      Reply
  • Justin

    November 28, 2018

    Hi George,

    Great Script!! Is there anything in this script that would affect receiving windows update deployments from SCCM that I would need to comment out prior to running?

    Thanks in advance for your time

    Reply
    • George Spiers

      November 28, 2018

      The script disables BranchCache and Windows Update related services so if SCCM needs those, you can comment them out under the services array.

      Reply
  • Simon

    January 18, 2019

    Hi George,

    Does this script support LTSC Builds as well? Looking to run it on a new 1809 VDI Build.

    Ta

    Simon

    Reply
    • George Spiers

      January 25, 2019

      It will run and do what it can, but some commands will fail due to the LTSC build not containing some components that non-LTSC builds have. I haven’t specifically tried running it on 1809. Give it a test and remember, snapshots are handy to rollback!

      Reply

Leave a Reply