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
    
    }
    
    }
    avatar

    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. Required fields are marked *

    © 4sysops 2006 - 2021

    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