File Explorer settings through Group Policy

Aidan Fitz 20 Reputation points
2024-06-25T17:09:26.99+00:00

Hello,

I am trying to edit the settings for the Windows 11 File Explorer in Local Group Policy. The settings I need are:

  • Music and Videos folder removed for all users.
  • File extensions viewable for all users.

Is this even possible to do through local GPO? Would it have to go through the domain instead? Is this even possible at all?

Windows 11
Windows 11
A Microsoft operating system designed for productivity, creativity, and ease of use.
8,812 questions
0 comments No comments
{count} votes

Accepted answer
  1. Ian Xue (Shanghai Wicresoft Co., Ltd.) 33,376 Reputation points Microsoft Vendor
    2024-06-26T01:36:10.4566667+00:00

    Hi,

    You can go to User Configuration \ Windows Settings \ Scripts (Logon\Logoff) and add a user logon script like this.

    Get-Item -Path $env:USERPROFILE\Music | Remove-Item -Recurse -Force
    Get-Item -Path $env:USERPROFILE\Videos | Remove-Item -Recurse -Force    
    Set-ItemProperty -Path HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced -Name HideFileExt -Value 0 -Type DWord -Force
    Stop-Process -Name explorer
    Start-Process -FilePath $env:SystemRoot\explorer.exe
    

    It will remove the Music and Videos folders and show file name extensions when a user logs on.

    User's image

    Best Regards,

    Ian Xue


    If the Answer is helpful, please click "Accept Answer" and upvote it.

    1 person found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. S.Sengupta 16,776 Reputation points MVP
    2024-06-26T01:22:50.9666667+00:00

    Unfortunately, editing File Explorer settings directly through Local Group Policy Editor (GPO) for specific folders like Music and Videos is not possible.

    Removing specific folders like Music and Videos from File Explorer requires modifying the registry.

    Open Notepad and create a batch file with the following content to remove the Music and Videos folders:

    reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "{BFB9D5E0-C6A9-404C-B2B2-AE6DB6AF4968}" /f
    reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "{BFB9D5E0-C6A9-404C-B2B2-AE6DB6AF4968}" /f
    reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v "{F38BF404-1D43-42F2-9305-67DE0B28FC23}" /f
    reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" /v "{F38BF404-1D43-42F2-9305-67DE0B28FC23}" /f
    
    
    0 comments No comments