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.
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 1Write-Host "2. Disabling hiding extensions for known files"Set-ItemProperty $key HideFileExt 0Write-Host "3. Disabling showing hidden operation system files"Set-ItemProperty $key ShowSuperHidden 0Write-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:
Write-Host "Enabling never group taskbar items option"Set-ItemProperty $key TaskbarGlomLevel 2Write-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.