Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # “Start\Control Panel\System and Security\Power Options“ öffnen und den Modus “High Performance” auswählen.
- # Höchstleistung aktivieren = SCHEME_MIN
- $SCHEME_MIN = "8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c"
- powercfg /SetActive $SCHEME_MIN
- $Index = 0 # 0 für aus bzw. nix machen
- # Damit die Harddisk nicht ausgeschaltet wird, den Wert auf „Never“ (vor 1) setzen.
- powercfg -x -monitor-timeout-ac $Index
- powercfg -x -monitor-timeout-dc $Index
- powercfg -x -disk-timeout-ac $Index
- powercfg -x -disk-timeout-dc $Index
- powercfg -x -standby-timeout-ac $Index
- powercfg -x -standby-timeout-dc $Index
- powercfg -x -hibernate-timeout-ac $Index
- powercfg -x -hibernate-timeout-dc $Index
- # powercfg /SET??VALUEINDEX SCHEMA-GUID UNTER-GUID EINSTELLUNGS-GUID
- function ChangePowerSetting($SUB_GUID, $SETTING_GUID, $SETTING_INDEX)
- {
- Write-Host "$SETTING_GUID to $SETTING_INDEX"
- powercfg -SetDcValueIndex $SCHEME_MIN $SUB_GUID $SETTING_GUID $SETTING_INDEX
- powercfg -SetAcValueIndex $SCHEME_MIN $SUB_GUID $SETTING_GUID $SETTING_INDEX
- }
- # Unter „USB settings“, „USB selective suspend setting“ Disabled auswählen.
- $USBSetting = "2a737441-1930-4402-8d77-b2bebba308a3" # USB settings
- $USBSelectiveSuspendSetting = "48e6b7a6-50f5-4782-a5d4-53bb8f07e226" # USB selective suspend setting
- ChangePowerSetting $USBSetting $USBSelectiveSuspendSetting $Index
- #Unter „PCI Express“, „Link State Power Management“ „Setting: Off“ auswählen
- $SUB_PCIEXPRESS = "501a4d13-42af-4429-9fd1-a8218c268e20" # PCI Express“
- $ASPM = "ee12f906-d277-404b-b6da-e5fa1a576df5" # Verbindungszustand-Energieverwaltung / Link State Power Management
- ChangePowerSetting $SUB_PCIEXPRESS $ASPM $Index
- <#
- Gerätetasten
- Die Einstellungen der Gerätetasten / Power Button Settings muss so angepasst werden, dass das System nicht aus
- Versehen oder beabsichtigt mit der Taste am Frontpaneel oder mit der Tastatur heruntergefahren werden kann.
- Control Panel > Hardware and Sounds > Power Options > System Settings > Power and sleep buttons setting
- Bei allen: Do nothing
- #>
- $PowerButtonsSettings = "4f971e89-eebd-4455-a8de-9e59040e7347"
- $PowerButtonAction = "7648efa3-dd9c-4e3e-b566-50f929386280" # To Change Default Power Button Action for Current Power Plan
- $LidCloseAction = "5ca83367-6e45-459f-a27b-476b1d01c936" # To Change Default Lid Close Action for Specific Power Plan
- $SleepButtonAction = "96996bc0-ad50-47ec-923b-6f41874dd9eb" # To Change Default Sleep Button Action for Specific Power Plan
- $Actions = @($PowerButtonAction, $LidCloseAction, $SleepButtonAction)
- foreach ($Action in $Actions)
- {
- ChangePowerSetting $PowerButtonsSettings $Action $Index
- }
- #Haken entfernen bei “Turn on fast start-up (recommended)”
- #Disable Windows 10 fast boot via Powershell
- # /v is the REG_DWORD /t Specifies the type of registry entries /d Specifies the data for the new entry /f Adds or deletes registry content without prompting for confirmation.
- REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Power" /v HiberbootEnabled /t REG_DWORD /d "0" /f
- powercfg /hibernate off
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement