Dave Finds

How to control Storage Sense using Group Policy Editor in Windows 10 device

Storage Sense is one of the great feature Microsoft has introduced in Windows 10. It’s a modern addition to Disk Cleanup. Storage Sense allows you to take care of certain folders by preventing them from getting overlarge and clean them up automatically. You can find the Storage Sense feature by going to Settings, under System -> Storage.

By default, Storage Sense is turned Off. Microsoft has introduced this features as a user’s choice so every user has to turn on this feature manually. When Storage sense is turned on, it will free up space only when your PC is low on space. But this works fine for an individual user or small group of users. If you are a system admin and managing 1000s of Windows 10 device you cannot go to every user desk and turn it on manually.

Storage Sense Group Policy list:

If you are using Windows 10 version 1903 or the above version. Then you can take advantage of the group policy option to enable Storage sense for your Windows 10 device. Microsoft has introduced 6 new group policy for Storage sense.

S No Group Policy Name Description
1 Allow Storage Sense Storage Sense can automatically clean some of the user’s files to free up disk space. By default, Storage Sense is automatically turned on when the machine runs into low disk space and is set to run whenever the machine runs into storage pressure. This cadence can be changed in Storage settings or set with the “Configure Storage Sense cadence” group policy.
2 Allow Storage Sense Temporary File Cleanup When Storage Sense runs, it can delete the user’s temporary files that are not in use. If the group policy “Allow Storage Sense” is disabled, then this policy does not have any effect.
3 Configure Storage Sense Cloud Content dehydration threshold When Storage Sense runs, it can dehydrate cloud-backed content that hasn’t been opened in a certain amount of days. If the group policy “Allow Storage Sense” is disabled, then this policy does not have any effect.
4 Configure Storage Sense Downloads cleanup threshold When Storage Sense runs, it can delete files in the user’s Downloads folder if they have been there for over a certain amount of days. If the group policy “Allow Storage Sense” is disabled, then this policy does not have any effect.
5 Configure Storage Sense cadence Storage Sense can automatically clean some of the user’s files to free up disk space. If the group policy “Allow Storage Sense” is disabled, then this policy does not have any effect.
6 Configure Storage Sense Recycle Bin cleanup threshold When Storage Sense runs, it can delete files in the user’s Recycle Bin if they have been there for over a certain amount of days. If the group policy “Allow Storage Sense” is disabled, then this policy does not have any effect.

How to turn ON Storage sense automatically?

Here I will try to explain each policy and enable or disable it accordingly.

  1. Open Group Policy Editor as an administrator by typing gpedit.msc in the search

    image

  2. Go to Computer Configuration\ Administrative Templates\ System\ Storage Sense

Enabling or disabling Storage sense

  1. On the right side, double-click the Allow Storage Sense policy.

  2. Select the Enabled or Disabled option.

Quick note: Using the Enabled or Disabled option will prevent users from changing the state of the feature using the Settings app.

  1. Click the Apply button.
  2. Click the OK button.

Once you complete the steps, if you enabled the option, then Storage sense will run automatically. In the case that you selected the Disabled option, then Storage sense will no longer run automatically, and users will not be able to enable the feature, but they’ll be able to access the settings page to free up space manually.

Scheduling automatic cleanup using Storage Sense

If you want to configure when Storage sense should run automatically while preventing users from changing the settings, use these steps:

  1. On the right side, double-click the Configure Storage Sense cadence policy.
  2. Select the Enabled option.
  3. Under the Options section, use the drop-down menu to specify when to run Storage sense automatically. Options available, include:
    • Every day.
    • Every week.
    • Every month.
    • During low free disk space.
  4. Click the Apply button.
  5. Click the OK button.

After you complete the steps, the feature will free up space during the cadance you specified.

How to disable temporary files deletion using Storage sense

If you want to prevent Storage sense from deleting temporary files automatically on Windows 10, use these steps:

  1. On the right side, double-click the Allow Storage Sense Temporary Files cleanup policy.
  2. Select the Disabled option.

Quick note: If you’re looking to lock the feature to prevent users from modifying this option in the Settings app, then you should select the Enabled option.

  1. Click the Apply button.
  2. Click the OK button.

Once you complete the steps, Storage sense will no longer delete temporary files automatically. However, users will still be able to remove junk files manually to free up space on the device.

How to set OneDrive folder content retention using Storage sense

Storage sense can free up space by making fully downloaded files online-only content, and starting with the May 2019 Update, using Group Policy, you can now disable the option or set a number of days before dehydrating files (remove the local copy) for up to one year with these steps:

  1. On the right side, double-click the Configure Storage Sense Cloud Content dehydration threshold policy.
  2. Set the vaule from 0 to 60 and Select the Enabled option.

Quick note: Selecting the Disabled option will stop Storage sense from making unused OneDrive files available only in the cloud to free up space automatically, but users will continue to be able to use this feature manually.

  1. Under the Options section, select the number of days (up to 365 days, instead of 60 using the Settings app) since a OneDrive file has been opened before making it available only in the cloud.
  2. Click the Apply button.
  3. Click the OK button.

After you complete the steps, the feature will only dehydrate files that haven’t been open according to your configuration. However, if you used the Disabled option, then Storage sense will no longer dehydrate unused files to free up space.

How to set Downloads folder content retention using Storage sense

The cleanup tool can also delete older files from the Downloads folder, but you can disable this option or set the age of the files before deletion up to one year with these steps:

  1. On the right side, double-click the Configure Storage Sense Downloads cleanup threshold policy.

  2. Select the Enabled option.

  3. Under the Options section, select the number of days (up to 365 days, instead of 60 using the Settings app) for the age of the file before deletion.
    Quick note: You can select the Disabled option to turn off the feature, but users will still manage it manually using the Settings app.

  4. Click the Apply button.

  5. Click the OK button.

Once you complete the steps, older files inside the Downloads folder will be removed according to your configuration. If you disabled the feature, then Storage sense will stop deleting files from the folder.

How to set Recycle Bin content retention using Storage sense

As part of the options to optimize the space usage on your device, Storage sense can also empty the Recycle Bin files. If you prefer to keep the deleted files a little longer, using Group Policy, you can disable the feature or set the number of days (up to one year) before deleting these files automatically using these steps:

  1. On the right side, double-click the Configure Storage Sense Recycle Bin cleanup threshold policy.

  2. Select the Enabled option.

  3. Under the Options section, select the number of days (up to 365 days, instead of 60 using the Settings app) before Storage sense empties the Recycle Bin automatically.

Quick note: You can select the Disabled option to prevent Storage sense from removing deleted files, but users will still be able to manage it manually using the Settings app.
4. Click Apply .
5. Click OK .

After you complete the steps, deleted files will continue in the Recycle Bin until you manually delete them. Or if you specified the Enabled option, then deleted files will be removed according to your new settings.