OneDrive, SharePoint, Wenig Speicherplatz, You don’t have enough free space in your OneDrive how to check GPO

Or where M365 cloud technology meets on-premises GPO.

imageimage

points to check:

  1. Check local free space of laptop
  2. Check if the user has hit a sharepoint OneDrive Quota online with PS in M365
  3. Check if there is a GPO policy that sets warning or/and block limits in GB

First we check if the laptop has space. The laptop01 from user01 has 65GB free. His local OneDrive Cache is 14GB but looks fine.

So let us check what user1 from customer.ch is doing wrong or IT does wrong.

Let us check some things M365 tenant side. Try to connect and if not install some module.

Connect-SPOService -Url "https://customer-admin.sharepoint.com"

Error:

Connect-SPOService : Die Benennung “Connect-SPOService” wurde nicht als Name eines Cmdlet, einer Funktion, einer Skriptdatei oder eines ausführbaren Programms erkannt. Überprüfen Sie die Schreibweise des Namens, oder ob der Pfad     korrekt ist (sofern enthalten), und wiederholen Sie den Vorgang.    In Zeile:1 Zeichen:1    + Connect-SPOService -Url “https://customer.sharepoint.com”    CategoryInfo          : ObjectNotFound: (Connect-SPOService:String) [], CommandNotFoundException FullyQualifiedErrorId : CommandNotFoundException

If warning above install install the SharePoint PS module under your scope user account

Install-Module Microsoft.Online.SharePoint.PowerShell -Scope CurrentUser

Nicht vertrauenswürdiges Repository Sie installieren die Module aus einem nicht vertrauenswürdigen Repository. Wenn Sie diesem Repository vertrauen, ändern Sie dessen InstallationPolicy-Wert, indem Sie das Set-PSRepository-Cmdlet ausführen. Möchten Sie die Module von ‘PSGallery’ wirklich installieren? [J] Ja [A] Ja, alle [N] Nein [K] Nein, keine [H] Anhalten [?] Hilfe (Standard ist “N”): j

 

Let us get an overview so we don’t have 2000 sites there and do things other don’t like, just how big the Sharepoint setup is

Get-SPOSite -Limit All |  Select StorageUsageCurrent, Url |  Sort-Object StorageUsageCurrent -Descending |  Select-Object -First 30

StorageUsageCurrent Url
------------------- ---
              29303 https://customer.sharepoint.com/sites/Cafe
              10412 https://customer.sharepoint.com/sites/Projekteintemp
               9606 https://customer.sharepoint.com/sites/Links
               2279 https://customer.sharepoint.com/sites/Projekt
                949 https://customer.sharepoint.com/sites/Sante
                631 https://customer.sharepoint.com/sites/Kunde
                350 https://customer.sharepoint.com/sites/Aktivsal
                270 https://customer.sharepoint.com/sites/Service
                207 https://customer.sharepoint.com/sites/Ost
                202 https://customer.sharepoint.com/sites/Hausdienst
                145 https://customer.sharepoint.com/sites/IT

List storage quota from all users in Sharepoint

Get-SPOSite -IncludePersonalSite $true -Limit All |  Select Owner, Url, StorageUsageCurrent, StorageQuota, StorageQuotaType

Owner               :
Url                 : https://customer.sharepoint.com/sites/user4
StorageUsageCurrent : 147
StorageQuota        : 26214400
StorageQuotaType    :

Owner               : user1@customer.ch
Url                 : https://customer.sharepoint.com/personal/user1
StorageUsageCurrent : 29
StorageQuota        : 1048576
StorageQuotaType    :

Owner               :
Url                 : https://customer.sharepoint.com/sites/user5
StorageUsageCurrent : 1
StorageQuota        : 26214400
StorageQuotaType    :

Check single user01

Get-SPOSite -Identity "https://customer.sharepoint.com/personal/user1_customer_ch" |  Select Url, StorageUsageCurrent, StorageQuota, StorageQuotaType, LockState

Url                 : https://customer.sharepoint.com/personal/user1
StorageUsageCurrent : 29
StorageQuota        : 1048576
StorageQuotaType    : Default
LockState           : Unlock

This all looks normal the user has a StorageUsageCurrent 29 and StorageQuota is 1048576.

So let us check the laptop the M365 user has “laptop01”

Invoke-Command -ComputerName "laptop01" -ScriptBlock {
    Get-CimInstance Win32_UserProfile |
        Where-Object { $_.LocalPath -like "C:\Users\*" } |
        Select-Object LocalPath, SID, Loaded
}



LocalPath      : C:\Users\deutscheradminkopiertgpo
SID            : S-1-5-21-6977092438-222634067-1652573912-4846
Loaded         : False
PSComputerName : laptop01
RunspaceId     : 82b51d52-d280-4a1f-99fc-31ea3e7f126e

LocalPath      : C:\Users\user01
SID            : S-1-5-21-2977092438-222634067-1652573912-4234
Loaded         : True < User is logged on and active
PSComputerName : laptop01
RunspaceId     : 82b51d52-d280-4a1f-99fc-31ea3e7f126e

We found the SID from user01

LocalPath : C:\Users\user01

SID : S-1-5-21-2977092438-222634067-1652573912-4234

Loaded : True < User is logged on and active

Let us check his OneDrive in his HKCU remote Registry. That means we connect with PS remote to his laptop from a management server we have access with PS. If you want to access the registry reote you would have to enable

remote-registry on the machine first. Computer Management/Computer Verwaltung, Connect to other computer > Service > Enable/Start Remote-Registry Server.

Open registry from remote machine

remote machine HKEY_USERS\S-1-5-21-2977092438-222634067-1652573912-4234\Software\Microsoft\OneDrive

Or with PS

SID : S-1-5-21-2977092438-222634067-1652573912-4234

Invoke-Command -ComputerName "laptop01" -ScriptBlock {
    $sid = "S-1-5-21-2977092438-222634067-1652573912-4234"

    Get-ItemProperty "Registry::HKEY_USERS\$sid\Software\Microsoft\OneDrive" |
        Format-List *
}

EnableDownlevelInstallOnBluePlus                 : 0
EnableTHDFFeatures                               : 1
Version                                          : 26.163.0823.0004
MultiAccountRegMigrationComplete                 : 0
OneDriveTrigger                                  : C:\Program Files\Microsoft OneDrive\OneDrive.exe
SCOOBEOptIn                                      : 256
LastRunOneDriveVersion                           : 26.163.0823.0004
PreSignInSettingsConfigTimestamp                 : {150, 233, 129, 109...}
UpdateRingSettingsLastSuccess                    : 20719
FileSyncShellKillSwitchFlag                      : 8
OOBERedirection                                  : 256
FileCoAuthTelemetryRampStatus                    : 1
FileCoAuthFeatureRampStatusFlags                 : 1
ClientConfigTelemetryTimeStamp                   : 1720159505
UpdateXMLRescanTime                              : 1440
SilentBusinessConfigByDefaultRamp                : 0
MachineGuidCollection                            : ddc01xxxx98aad7
HostNameCollection                               : laptop01
UserNameCollection                               : user01
UserDomainCollection                             : customer
EmailHRDHostname                                 : https://odc.officeapps.live.com
CrashCountLimitToDelayInitializationForTelemetry : 0
CrashLoopDelayMsToSendTelemetry                  : 0
DeviceIdChangeTrackWinV2                         : 3
SilentBusinessConfigCompleted                    : 1
NucleusUpdateRingConfigTimestamp                 : {155, 114, 221, 51...}
DeviceIdForODC                                   : {cbdxxxxxdb9062c4e}
OriginatorIdForODC                               : {795bxxxxxc7295f2}
BoxIdForOffice                                   : {cbddxxxxx32c4e}
OfficeOriginatorID                               : {8e4exxxxxee64af}
UpdateRingPostAuthConditions                     : 0
ClientEverSignedIn                               : 1
SparsePackageEverSetup                           : 1
FootprintHeavyTestAssignedBin                    : 1790178897
OduCheckForUpdateStartTime                       : 1390139504
OduCheckForUpdateEndTime                         : 1390139505
AutoStartEnabled                                 : 1
LastRunKeyEnabledTime                            : 1390139504
CommonStringUtilUseUnicodeStr                    : 1
DownloadURSFromOneDriveLauncherSafe              : 1
OneDriveRestartedNucleusTimestamp                : 1387151846
LastOneDriveLauncherRunTime                      : 1390140042
DeviceFeatureMask                                : 0
NucleusECSConfigTimestamp                        : {80, 243, 230, 51...}
IsPerMonitorV2DpiRamped                          : 1
StaleUpdateRingSettings                          : 0
FileCoAuthRunMarker                              : 1
PSPath                                           : Microsoft.PowerShell.Core\Registry::HKEY_USERS\S-1-5-21-2977092438-2
                                                   22634067-1652573912-4234\Software\Microsoft\OneDrive
PSParentPath                                     : Microsoft.PowerShell.Core\Registry::HKEY_USERS\S-1-5-21-2977092438-2
                                                   22634067-1652573912-4234\Software\Microsoft
PSChildName                                      : OneDrive
PSProvider                                       : Microsoft.PowerShell.Core\Registry

Does the user have many OneDrive accounts? He he using as example one business and some private or from third party company they work with?

Let us check: HKEY_USERS\$sid\Software\Microsoft\OneDrive\Accounts

You wont get smarter for the Registry? Because the Business2 is UNDER the Business1 and also another times separate as Business2 same hierarchies as Business1

remote machine HKEY_USERS\S-1-5-21-2977092438-222634067-1652573912-4234\Software\Microsoft\OneDrive\Accounts

Same with PS

Invoke-Command -ComputerName "laptop01" -ScriptBlock {
    $sid = "S-1-5-21-2977092438-222634067-1652573912-4234"

    Get-ChildItem "Registry::HKEY_USERS\$sid\Software\Microsoft\OneDrive\Accounts" |
        Select-Object PSChildName
}

SChildName PSComputerName RunspaceId
---------- -------------- ----------
Business1   laptop01   ebb59589-10da-449f-5e52-4178f0902ef5
Business2   laptop01   ebb59589-10da-449f-5e52-4178f0902ef5
Personal    laptop01   ebb59589-10da-449f-5e52-4178f0902ef5
Invoke-Command -ComputerName "laptop01" -ScriptBlock {
    $sid = "S-1-5-21-2977092438-222634067-1652573912-4234"

    foreach ($account in "Business1","Business2","Personal") {
        $path = "Registry::HKEY_USERS\$sid\Software\Microsoft\OneDrive\Accounts\$account"

        if (Test-Path $path) {
            Write-Host "`n========== $account ==========" -ForegroundColor Cyan

            Get-ItemProperty $path |
                Select-Object UserEmail, UserFolder, DisplayName
        }
    }
}

========== Business1 ==========


UserEmail            : user01@customer.ch
UserFolder           : C:\Users\user01\OneDrive - Customer Business Unit CH
DisplayName          : Customer Business Unit CH
TenantId             :
TenantName           :
LastKnownUserFolder  :
FilesOnDemandEnabled :
StorageQuota         :
StorageUsed          :
PSComputerName       : laptop01
RunspaceId           : 7881b40f-743c8-4447c-a482-d1d44f9b7e73b


========== Business2 ==========
UserEmail            :
UserFolder           :
DisplayName          :
TenantId             :
TenantName           :
LastKnownUserFolder  :
FilesOnDemandEnabled :
StorageQuota         :
StorageUsed          :
PSComputerName       : laptop01
RunspaceId           : 7881b440f-74c48-447c-a482-d1d444f9b7e73b


========== Personal ==========
UserEmail            :
UserFolder           :
DisplayName          :
TenantId             :
TenantName           :
LastKnownUserFolder  :
FilesOnDemandEnabled :
StorageQuota         :
StorageUsed          :
PSComputerName       : laptop01
RunspaceId           : 7881b440f-74c8-447c-a482-d1d4f449b7e73b

Looks like he is only using ========== Business1 ========== active and is in sync to his laptop. Regarding space and quota that is what we need to know.

From the M365 side everything looks normal and is NOT the source.

Let us just if the user and machine gets a policy which does anything we don’t want.

Invoke-Command -ComputerName "laptop01" -ScriptBlock {
    $sid = "S-1-5-21-2977092438-222634067-1652573912-4234"

    $paths = @(
        "Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\OneDrive",
        "Registry::HKEY_USERS\$sid\Software\Policies\Microsoft\OneDrive"
    )

    foreach ($path in $paths) {
        if (Test-Path $path) {
            Write-Host "`n=== $path ===" -ForegroundColor Cyan
            Get-ItemProperty $path | Format-List *
        }
    }
}



=== Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\OneDrive ===


BlockExternalSync                  : 1
PermitDisablePermissionInheritance : 0
MinDiskSpaceLimitInMB              : 40000
EnableSendFeedback                 : 0
EnableSurveyCampaigns              : 0
EnableContactSupport               : 0
KFMSilentOptInDesktop              : 0
KFMSilentOptInDocuments            : 0
KFMSilentOptInPictures             : 0
KFMBlockOptIn                      : 2
SilentAccountConfig                : 1
FilesOnDemandEnabled               : 1
LocalMassDeleteFileDeleteThreshold : 20
WarningMinDiskSpaceLimitInMB       : 80000
PSPath                             : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\OneDrive
PSParentPath                       : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft
PSChildName                        : OneDrive
PSProvider                         : Microsoft.PowerShell.Core\Registry

Solution > We found the cause

MinDiskSpaceLimitInMB        : 40000
WarningMinDiskSpaceLimitInMB : 80000
That means:
  • 40,000 MB (~40 GB) = minimum disk space threshold
  • 80,000 MB (~80 GB) = warning threshold
  • Her laptop has only ~65 GB free
  • Therefore OneDrive sees 65 GB < 80 GB warning threshold and displays “Wenig Speicherplatz auf Ihrem Gerät”.

So nothing is actually full.

The warning is being triggered by your organization’s OneDrive policy. 😉

Let us find the GPO which some guy copied over from another customer and did not check the client fleet and type before activation.

GPO side check there is a W11_CU_OneDrive (Nice done with C and U part visible in naming so we know it is a Computer and User Policy in one.

image

Warn users who are low on disk space

Applies to: Group Policy, Intune

This setting lets you specify a minimum amount of available disk space, and warn users when the OneDrive sync app (OneDrive.exe) downloads a file that causes them to have less than this amount. Users are prompted with options to help free up space.

Enabling this policy sets the following registry key value to a number from 0 through 10240000:

[HKLM\SOFTWARE\Policies\Microsoft\OneDrive] "WarningMinDiskSpaceLimitInMB"=dword:00000000

Computerkonfiguration >RichtlinienAusblenden > Administrative Vorlagen > OneDrive > Benutzer mit wenig Speicherplatz warnen

image

image

image

Good explanation in detail on MS learn so cloud-o-mania managers also understands. 😉

https://learn.microsoft.com/en-us/sharepoint/use-group-policy

 


 Category published:  Azure GPO | Gruppenrichtlinien Intunes M365 - Exchange Online M365,AZURE,INTUNE   Click on the Category button to get more articles regarding that product.