Giter Club home page Giter Club logo

microsoft's Introduction

Microsoft

About FSLogix-RemoveContainerData.ps1

FSLogix-RemoveContainerData is used to delete files and folders in a user's FSLogix Profile and Office Container by mounting the Container and pruning files, thus keeping the Container size to a minimum. The script reads an XML file that defines a list of files and folders to remove from the Container. Actions on a target path can be:

Prune - the XML can include a number that defines the age in days for last write that the file must be older than to be deleted. Essentially reducing the size of the folder. Delete - the target path will be deleted. Where the administrator may want to remove a target path, the Delete action will delete the entire folder. Trim - where the target path contains sub-folders, this action will remove all sub-folders except for the newest folder. Supports -WhatIf and -Verbose output and returns a list of files removed from the profile. Add -Verbose will output the total size of files removed from the user profile and processing time at the end of the script. All targets (files / folders) that are deleted, will be logged to a file.

Deleting files from the Container can potentially result in data loss, so testing is advised and the use of -Confirm:$false is required for the script perform a delete.

This script depends on the following PowerShell modules:

ActiveDirectory - Installed as a feature in Windows Server or via RSAT Hyper-V - Installed as a feature in Windows Server or via RSAT Fslogix.Powershell.Disk - this module is found here: https://github.com/aaronparker/fslogix/tree/main/Modules/Fslogix.Powershell.Disk

Usage

.\FSLogix-RemoveContainerData.ps1 -Path \server\FSLogixContainer -Targets .\targets.xml -Type Profile

Running FSLogix-RemoveContainerData.ps1

FSLogix-RemoveContainerData.ps1 must be run outside the user session when Profile Containers are not in use. The script will require exclusive access to the Container to mount it with read/write access. Remove-ContainerData.ps1 could be run as a schedule task outside of business hours from a management host.

microsoft's People

Contributors

deyda avatar jimmoyle avatar

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.