Hey everyone! I've been having this annoying issue where my display sometimes switches the refresh rate while I'm gaming. When it happens, about three-quarters of the screen goes black or gets all fuzzy. I have to exit to the desktop, right-click, and navigate through the display settings to set it back to 60Hz, but sometimes I can't even access the settings due to the display malfunction. This forces me to restart my laptop using the power button, which is super frustrating. I'm wondering if there's a way to change the refresh rate using PowerShell. I'd really appreciate any scripts or direction to solve this, as I can't afford a new display right now. Thanks in advance! Oh, and I'm running Windows 10 64-bit.
1 Answer
You can definitely handle this with PowerShell, but keep in mind that you might need to use the Win32 API to get it done. Check out this documentation for some starting points: [EnumDisplaySettings](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-enumdisplaysettingsa) and [ChangeDisplaySettingsEx](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-changedisplaysettingsexa). Good luck, and let me know if you have questions!

Thank you so much for the links! I really appreciate your help! You're awesome!