Last modified at 3/7/2014 12:41 PM by Koen Zomers

If you're like me and like to script everything out, you might run into the situation where you want to set up a complete environment from scratch using PowerShell. This might include finetuning the Windows Explorer settings. If you wish to do so, you can use the below PowerShell as a sample.

PowerShell-ConfigureExplorerSettings-ChangeSettingsMenu.png

PowerShell-ConfigureExplorerSettings-ChangeSettingsOptions.png

‚ÄčThe above three marked options can be set via PowerShell using the following script:

$key = "HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
Write-Host "1. Enabling showing hidden files"
Set-ItemProperty $key Hidden 1
Write-Host "2. Disabling hiding extensions for known files"
Set-ItemProperty $key HideFileExt 0
Write-Host "3. Disabling showing hidden operation system files"
Set-ItemProperty $key ShowSuperHidden 0
Write-Host "Restarting explorer shell to apply registry changes"
Stop-Process -processname explorer

 Another option that I always like to disable is the grouping of instances of similar applications on the Windows taskbar. This can be done using the PowerShell script below:

PowerShell-ConfigureExplorerSettings-TaskBarProperties.png

PowerShell-ConfigureExplorerSettings-TaskBarProperties-NeverCombineWindows.png

Write-Host "Enabling never group taskbar items option"
Set-ItemProperty $key TaskbarGlomLevel 2

Write-Host "Restarting explorer shell to apply registry changes"
Stop-Process -processname explorer


As you notice in both scenarios you need to kill the explorer process in order for the changes to be applied. Simply updating the registry keys alone will not work. After killing the explorer process, it will automatically and directly restart itself. This time with the changed configuration applied to it.