Powershell change folder view miniature/icons

Filip 831 Reputation points
2021-04-15T11:52:11.277+00:00

Hello everybody.
How can i change the folder view with powershell from minaatures to icons?
see images what i mean.
this->
88275-a.png
to this->
88204-b.png

Windows for business | Windows Server | User experience | PowerShell
{count} votes

2 answers

Sort by: Most helpful
  1. Andreas Baumgarten 123.4K Reputation points MVP Volunteer Moderator
    2021-04-15T12:41:31.19+00:00

    Hi @Filip ,

    I am not 100% sure if the "folder view icons setting" is a registry based setting.

    Maybe this is worth a try:

    • Set the folder view icons setting to something you don't want (for instance "Details")
    • Export the registry key: HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer
    • Set the folder view icons setting to something you want (for instance "Large Icons")
    • Export the registry key: HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer
    • Compare the reg files for changes.

    With this result you can update the registry via PowerShell cmdlet Set-ItemProperty

    https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/set-itemproperty?view=powershell-7.1

    ----------

    (If the reply was helpful please don't forget to upvote and/or accept as answer, thank you)

    Regards
    Andreas Baumgarten

    0 comments No comments

  2. Les Ferch 61 Reputation points
    2023-07-20T16:19:38.5966667+00:00

    Folder views for fixed and removable drives are stored here:

    HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\BagMRU
    HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\Bags

    Folder views for network drives are stored here:

    HKCU\Software\Microsoft\Windows\Shell\BagMRU
    HKCU\Software\Microsoft\Windows\Shell\Bags

    The indexing is such that you cannot simply capture the view for a given folder.

    You can however set the view for a given folder type and capture that setting and then reapply it using PowerShell. However, the change will only apply to folders that have not yet had their view saved (i.e. have not yet been opened and closed) unless you clear the saved views for these folders. It is very difficult to programmatically clear the saved views for a specific folder or set of folders, but you can clear ALL saved views by deleting the keys listed above.

    Default views as set by "Apply to Folders" are stored in:

    HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Defaults

    Default views for Windows defaults are stored in the protected key:

    HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes

    Default views may be set by replicating the above key and then modifying it in:

    HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\FolderTypes

    Note the statement above regarding the application of such defaults. That is existing views must be cleared from the registry.

    Note that all of this is handled by the tool WinSetView which includes a PowerShell script that may be used from the command line. See the documentation for more detail.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.