Skip to content

Instantly share code, notes, and snippets.

@michael-baker
Last active April 4, 2022 06:07
Show Gist options
  • Save michael-baker/f3962ba8d21ebd680b8e76c20eaa48c1 to your computer and use it in GitHub Desktop.
Save michael-baker/f3962ba8d21ebd680b8e76c20eaa48c1 to your computer and use it in GitHub Desktop.
Apply an Intel XTU profile from PowerShell
# Must be run under 32-bit PowerShell as ProfilesApi is x86
[System.Reflection.Assembly]::LoadFrom("C:\Program Files (x86)\Intel\Intel(R) Extreme Tuning Utility\Client\ProfilesApi.dll") | Out-Null
# This script programmatically applies an Intel XTU profile.
# This script can replace the CLI method outlined here: https://www.reddit.com/r/Surface/comments/3vslko/change_cpu_voltage_offset_with_intel_xtu_on/
[ProfilesApi.XtuProfileReturnCode]$applyProfileResult = 0
$profileApi = [ProfilesApi.XtuProfiles]::new()
$profileApi.Initialize() | Out-Null
[ProfilesApi.XtuProfileReturnCode]$result = 0
$profiles = $profileApi.GetProfiles([ref] $result)
$profile = $profiles | Where-Object { $_.ProfileName -eq "Undervolt" } | Select-Object -First 1
if ($profile) {
$applied = $profileApi.ApplyProfile($profile.ProfileID, [ref]$applyProfileResult)
if ($applied) {
Write-Host "$applyProfileResult. Profile applied"
} else {
Write-Host "$applyProfileResult. Profile not applied."
}
}
sleep 10
@RGD2
Copy link

RGD2 commented Apr 4, 2022

XTU 6.5.1.371 : I get 'Sucess Profile applied', but it doesn't actually work.

Still have to go into XTU an manually tweak settings each boot to get it to do what I want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment