Change desktop icon size in Powershell?
Writing a PS script to quickly set up devices @ work. I need a way to set this in cmd/PS, but extensive searching results in... nothing. Where is this preference even stored? I found:
HKEY_CURRENT_USER\Control Panel\Desktop\WindowMetrics\Shell Icon Size=32
But no matter what, this is 32 and changing it doesn't seem to change the size. Thoughts, SU?
Solution 1:
On my Windows 10 machine, this value is stored in HKCU\Software\Microsoft\Windows\Shell\Bags\1\Desktop
in IconSize
. After changing its value, you must restart explorer.exe
. Logging off is not required.
So you could use,
Set-ItemProperty -path HKCU:\Software\Microsoft\Windows\Shell\Bags\1\Desktop -name IconSize -value 48
Stop-Process -name explorer # explorer.exe restarts automatically after stopping
This also allows you to custom size the icons beyond the preset Small/Medium/Large.