Home Applications Set-SageSet1 PowerShell Script V1.00 | Carl Webster

Set-SageSet1 PowerShell Script V1.00 | Carl Webster

Set-SageSet1 PowerShell Script V1.00 | Carl Webster

A Windows utility I am surprised that a lot of admins don’t know about is Disk Cleanup. Running the Windows app doesn’t provide as many options as running the same program from the command line.

I use the command line option when finalizing master images before the provisioning process. You can also run this on manually provisioned Citrix XenApp servers.

This script automates setting all the options for running cleanmgr.exe.

In Windows 10 1803 and Server 2016 with all updates, running cleanmgr.exe /sageset:1 shows 24 options for items that can be cleaned up. These items are called Disk Cleanup Handlers. Full details can be found at Creating a Disk Cleanup Handler.

The Handlers are registered in the registry at Computer HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionExplorerVolumeCaches.

The number of entries in VolumeCaches varies by Windows version and which updates are installed. Instead of spending a couple of minutes manually selecting every item in the dialog for cleanmgr.exe, I decided to script the process. On my test virtual machines, setting all 24 entries takes less than one second.

You can always find the most current script by going to https://carlwebster.com/where-to-get-copies-of-the-documentation-scripts/


Read the entire article here, Set-SageSet1 PowerShell Script V1.00 | Carl Webster

Via Carl Webster

Carl Webster Carl Webster is a Sr. Solutions Architect for Choice Solutions, with over 38 years of IT experience, based in the Nashville, TN area. Webster has been working with application and desktop virtualization since 1990 and with Active Directory since 2001. Webster travels the world doing XenApp, XenDesktop, HP Moonshot and Active Directory projects. He holds the prestigious Citrix Technology Professional designation.

Featured Resources:

Related Articles:


White Papers

    Application Lifecycle Management with Stratusphere UX – White Paper

    Enterprises today are faced with many challenges, and among those at the top of the list is the struggle surrounding the design, deployment, management and operations that support desktop applications. The demand for applications is increasing at an exponential rate, and organizations are being forced to consider platforms beyond physical, virtual and cloud-based environments. Users […]


      Download Commvault VM Backup and Recovery: end-to-end VM backup, recovery and cloud management

      Commvault’s ability to provide end-to-end VM backup, recovery and cloud management creates a significantly better way to build, protect and optimize VMs throughout their lifecycle. Our best-in-class software for VM backup, recovery and cloud management delivers a number of significant benefits, including: VM recovery with live recovery options; backup to and in the cloud; custom-fit […]

      On-Demand Webinars

        What’s Going on in EUC Printing – A Technical Deep Dive!

        The IGEL Community and ThinPrint invite you to watch the following technical deep dive webinar. The agenda is to technically bring you up to speed on what’s going on in the EUC Printing space today along with a deep dive into new methods, technologies, printing scenarios and a discussion on why printing still matters. You […]

        Latest Videos

          Views All IT News on DABCC.com
          Views All IT Videos on DABCC.com
          Win big $$, visit ITBaller.com for more info!

          Visit Our Sponsors