|
@@ -0,0 +1,15 @@
|
|
1
|
+if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
|
|
2
|
+ Start-Process PowerShell -Verb RunAs "-NoProfile -ExecutionPolicy Bypass -Command `"cd '$pwd'; & '$PSCommandPath';`"";
|
|
3
|
+ exit;
|
|
4
|
+}
|
|
5
|
+
|
|
6
|
+Get-CimInstance -ClassName MsPower_deviceEnable -Namespace root/WMI | Set-CimInstance -Property @{Enable = $false}
|
|
7
|
+
|
|
8
|
+powercfg -import .\UltimatePerformanceEnhanced.pow
|
|
9
|
+pause
|
|
10
|
+$p = Get-CimInstance -Name root\cimv2\power -Class win32_PowerPlan -Filter "ElementName = '<UltimatePerformance>'
|
|
11
|
+
|
|
12
|
+powercfg /setactive ([string]$p.InstanceID).Replace("Microsoft:PowerPlan\{","").Replace("},"UltimatePerformance"
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+### Script written by Nathan Deuster ###
|