OneDrive - Free up space using a PowerShell script

This script is useful when using Windows 10 in a VDI environment that does not have the automatic storage saving feature. The files on demand feature has to be enabled.

Latest posts by Sukhpreet Boparai (see all)
    if (Test-Path $env:OneDriveCommercial){
    Set-Location $env:OneDriveCommercial
    if ($env:OneDriveCommercial -like "$(Get-location)"){
    attrib -p +u /s

    Tags: windows

    Discussion (0)

    There are no comments for this doc yet.

    Leave a Reply

    Please enclose code in pre tags

    Your email address will not be published.

    © 4sysops 2006 - 2023


    Please ask IT administration questions in the forums. Any other messages are welcome.


    Log in with your credentials


    Forgot your details?

    Create Account