Giter VIP home page Giter VIP logo

tatortreiniger's Introduction

Cleanup temporary or cached files

Free as in freedom microsoft windows terminal server cleanup script.

The current change log can be found here.

This Skript is currently tested on:

  • Windows Server 2012 - Version 6.2 (Build 9200)
  • Windows Server 2012 R2 - Version 6.3 (Build 9600)
  • Windows 10 - Version 20H2 (Build 19042.870)

Something for the mood

Screenshot of an execution.

Screenshot of some logged lines.

Configuration and using it

This script comes out of the box in a "ready to execute" way. You can run the start_clean_up_system.bat right away as administrator and the script will clean up stuff.

If you want to configure anything, you should copy the localConfiguration.ps1.dist as localConfiguration.ps1 in the data path. You can enable verbosity or log level in the local configuration. And of course, you can add more paths for the clean up system itself. If you want to configure anything per host basis but keep it in the same path, you can create a file like local-<hostname>-Configuration.ps1 in the data path.

For each path, you can configure if you want to keep files older than x days. Furthermore, you can run a duplicate check, based on file hashs, and restrict to only bigger files. This script comes with a bit of magic. If you put it $user in a path, the script will replace this with all available users it can find below C:\Users\.

The skript is shipped with a lock mechanism to prevent executing the same script in parallel.

The skript can log! In fact, if you run it with $globalLogLevel = 0, you get a lot of information. The skript is silent by default. Even under windows, the unix way is the right one, be silent until I set $beVerbose = $true.

General Idea

This script helps you to clean up a multi user window system, like a terminalserver, with just one click. The script is logging what it does, depending on your log level more or less. The script comes with a collection of paths pointing to temporary or cache files.

You should run this script when no user is using the system, like at night.

At the end, you iterate over a big list of locations and delete the content of it.

Links

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.