1

I am trying to set the Visual effects to "adjust to best performance" to optimize the OS performance.I am using Powershell DSC configuration which referring registry resource and applying this configuration.

Before creating the configuration file, i am running powershell commands for testing purpose.I am running the following commands

PS C:\WINDOWS\system32> $path = 'HKCU:\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects'

PS C:\WINDOWS\system32> $s = (Get-ItemProperty -ErrorAction stop -Name visualfxsetting -Path $path).visualfxsetting.

I am getting the following error:

PS C:\WINDOWS\system32> $s = (Get-ItemProperty -ErrorAction stop -Name visualfxsetting -Path $path).visualfxsetting 
Get-ItemProperty : Property visualfxsetting does not exist at path HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\VisualEffects.
At line:1 char:7
+ $s = (Get-ItemProperty -ErrorAction stop -Name visualfxsetting -Path  ...
+       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (visualfxsetting:String) [Get-ItemProperty], PSArgumentException
    + FullyQualifiedErrorId : System.Management.Automation.PSArgumentException,Microsoft.PowerShell.Commands.GetItemPropertyCommand.

When i look in the registry editor, there is no key named visualfxsetting under VisualEffects and no value set.

enter image description here

Does this mean first i have to create a registry key and value and then use it to apply the configuration? If so what type of registry key i have to create and what value i have to set?

Harshith R
  • 418
  • 1
  • 11
  • 31
  • 1
    You don't want to create another **Key**, just a property with name `VisualFXSetting` (mind the case). Have a look at [this answer](https://stackoverflow.com/a/20517527/9898643) – Theo Mar 06 '19 at 10:07
  • 1
    that setting is systemwide so wouldnt it be in HKLM? – Leon Evans Mar 06 '19 at 11:31
  • 1
    See this article - https://social.technet.microsoft.com/Forums/windowsserver/en-US/73d72328-38ed-4abe-a65d-83aaad0f9047/adjust-for-best-performance?forum=winserverpowershell – Leon Evans Mar 06 '19 at 11:48

0 Answers0