Prompt Users to move known folders to one drive

Occasional Contributor



I logged in to DC and opened Group Policy Management and I saw onedrive gpo and i modifed the prompt users to move known folders to one drive by enabling it and providing a Tenant ID. Also performed gpupdate after and rebooted machines. But no users getting prompt about it. What should I be doing wrong? I saw 2-3 GPO with one drive in it and I did enable it on all of them.  please help



1 Reply
We do the same thing but with registry keys through our RMM tool (that way it works whether they are domain joined or not). I believe GPO's just set these reg keys so I imagine that's why we are seeing the same results as you (meaning flaky results).  I would definitely advise to use more that just that one policy. There are some really good ones to enable, like silent move and files on demand. That being said, it still is not 100% for us. For example, it only works if the user is signed in to OneDrive and OneDrive has to be open. Even then it doesn't always work until a reboot and OneDrive is launched again. You can use the new public preview of OneDrive sync admin center to see if users are even signed in to OneDrive:
Below is the script we use with our RMM tool:
    [Parameter(Mandatory = $true)]
    [Parameter(Mandatory = $false)]

    [Parameter(Mandatory = $false)]

#Defining Variables
##Path to HKLM keys
$HKLMregistryPath = 'HKLM:\SOFTWARE\Policies\Microsoft\OneDrive'
#Create Function
Function New-RegistryKey {
    if (!(Test-Path $HKLMRegistryPath)) { 
        Write-Host 'Registry Key Not Found, Creating Key'
        New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft' -Name OneDrive -Force
    else { 
        Write-Host "Key Already Present"
        Get-Item $HKLMregistryPath
Function New-RegistryKeyAutoMount {
    if (!(Test-Path $AutoMountKey)) { 
        Write-Host 'Registry Key Not Found, Creating Key'
        New-Item -Path 'HKLM:\SOFTWARE\Policies\Microsoft\OneDrive' -Name TenantAutoMount -Force
    else { 
        Write-Host "Key Already Present"
        Get-Item $AutoMountKey

#Run Functions

#Create the Values
##Redirect WKFs silently 
New-ItemProperty -Path $HKLMregistryPath -Name "KFMSilentOptIn" -Value $AzureTenantID -PropertyType "String" -Force
##Redirect with wizard
New-ItemProperty -Path $HKLMregistryPath -Name "KFMOptInWithWizard" -Value $AzureTenantID  -PropertyType "String" -Force
##Enable Files on Demand
New-ItemProperty -Path $HKLMregistryPath -Name "FilesOnDemandEnabled" -Value 1 -PropertyType DWORD -Force
##Enable silent account configuration
New-ItemProperty -Path $HKLMregistryPath -Name "SilentAccountConfig" -Value 1 -PropertyType DWORD -Force
##Block Opt Out
New-ItemProperty -Path $HKLMregistryPath -Name "KFMBlockOptOut" -Value 1 -PropertyType DWORD -Force
##Enable Automatic Upload Bandwidth Management
New-ItemProperty -Path $HKLMregistryPath -Name "EnableAutomaticUploadBandwidthManagement" -Value 1 -PropertyType DWORD -Force
##Block file downloads when users are low on disk space
New-ItemProperty -Path $HKLMregistryPath -Name "MinDiskSpaceLimitInMB" -Value 5120 -PropertyType DWORD -Force
##Set OneDrive to Production Ring
New-ItemProperty -Path $HKLMregistryPath -Name "GPOSetUpdateRing" -Value 5 -PropertyType DWORD -Force
##Enable Sync Admin Reports
if ($TenantKey) {
    New-ItemProperty -Path $HKLMregistryPath -Name "SyncAdminReports" -Value $TenantKey -PropertyType "String" -Force
else {
    Write-Host "TenantKey parameter was not defined"