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.

Avatar
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
    
    }
    
    }
    avataravatar

    Tags: windows

    Discussion (0)

    There are no comments for this doc yet.

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    © 4sysops 2006 - 2023

    CONTACT US

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

    Sending

    Log in with your credentials

    or    

    Forgot your details?

    Create Account