Change folder redirection (This PC) on Windows 11 Pro and Group Policy editor issue (asks for 32/64 bit)

mvierssen

New Member
I'm almost done with my fully automated Windows installation (> 50 applications automatically silently installed and configured), but there are a few (hopefully) final things I need to fix.

Any idea how I can change the following programmatically? From what I have read it is called "folder redirection" and some people recommend it to be changed through a group policy. Sadly this is only supported in Enterprise and up.

folder_redirection.png

I created a script that changes the "shell folder" locations (attached below). While it does change the "shell folder" locations it does not change the "folder redirection" locations under "This PC" in the Explorer side panel.

Aside of the above. Does anyone here happen to know what might be causing the following problem with the Group Policy editor?

group_policy_version.png

This starts happening a few days after I install Windows (I suspect an update). Then a while later this happens:

group_policy_missing_definition.png

After multiple re-installations of Windows 11, the same issue.
 

Attachments

  • mvierssen-w11.xml
    33.9 KB
  • UserSetDefaultDirectories.ps1.txt
    15.7 KB
I disable them all via reg entry

Thanks for the suggestion. That is what I am now doing as well. I add the folders to the Quick Access instead using another script.
 

Attachments

  • MachineHideThisPCFolders.ps1.txt
    2.5 KB
  • UserCleanupQuickAccess.ps1.txt
    3 KB
Last edited:
You can edit quick access via cmd for exp;

Code:
>nul powershell -noprofile -executionpolicy bypass -command "$p=$env:USERPROFILE; $o = New-Object -Com shell.application; $o.Namespace($p).Self.InvokeVerb('pintohome')"
>nul powershell -noprofile -executionpolicy bypass -command "$p=$env:USERPROFILE + '\Pictures'; $o = New-Object -Com shell.application; ($o.Namespace('shell:::{679F85CB-0220-4080-B29B-5540CC05AAB6}').Items() | Where-Object { $_.Path -like $p }).InvokeVerb('unpinfromhome')"
>nul powershell -noprofile -executionpolicy bypass -command "$p=$env:USERPROFILE + '\Documents'; $o = New-Object -Com shell.application; ($o.Namespace('shell:::{679F85CB-0220-4080-B29B-5540CC05AAB6}').Items() | Where-Object { $_.Path -like $p }).InvokeVerb('unpinfromhome')"
>nul powershell -noprofile -executionpolicy bypass -command "$p=$env:USERPROFILE + '\Music'; $o = New-Object -Com shell.application; ($o.Namespace('shell:::{679F85CB-0220-4080-B29B-5540CC05AAB6}').Items() | Where-Object { $_.Path -like $p }).InvokeVerb('unpinfromhome')"
>nul powershell -noprofile -executionpolicy bypass -command "$p=$env:USERPROFILE + '\Videos'; $o = New-Object -Com shell.application; ($o.Namespace('shell:::{679F85CB-0220-4080-B29B-5540CC05AAB6}').Items() | Where-Object { $_.Path -like $p }).InvokeVerb('unpinfromhome')"

this will unpin docs, music, videos, pictures and pins userprofile. leaves downloads and desktop at default. same solution as yours but i think more tidy
 
Aside of the above. Does anyone here happen to know what might be causing the following problem with the Group Policy editor?

This starts happening a few days after I install Windows (I suspect an update). Then a while later this happens:
CU will release updates to random MMC snap-ins. Removal reinstalls should clean it up.
 
CU will release updates to random MMC snap-ins. Removal reinstalls should clean it up.
That worked!!! Thanks!!! There must be a hidden update that adds them because I run NTLite every time after an update.
Do you happen to know why I have to choose between 32bit or 64bit when starting the Local Group Policy editor?
 
Back
Top