Adjusting visual effects using powershell

I am creating a bunch of windows servers in my organizations private cloud. One problem i noticed that all of those servers have System-->Advanced Settings-->Advanced-->Performance Setting-->Visual Effect set to 'Adjust for best appearance' which makes the server very slow> I want to reset that to 'Adjust for best performance' using powershell.

I tried using below option to change that in registry, it sets the option as expected but the change doesnt come into effect either with a log off or a reboot.

$path = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects'

try {

    $s = (Get-ItemProperty -ErrorAction stop -Name visualfxsetting -Path $path).visualfxsetting 

    if ($s -ne 2) {

        Set-ItemProperty -Path $path -Name 'VisualFXSetting' -Value 2  



catch {

    New-ItemProperty -Path $path -Name 'VisualFXSetting' -Value 2 -PropertyType 'DWORD'


Any thoughts about this?

Parents Reply Children
No Data