Ana içeriğe geç
Yardım

Orijinal gönderinin sahibi: Bhasker Kumar

Metin:

its not only for the  ''Root Hub'' [br]
[br]
set it for each and every elemeents under Device Manager > Universal Serial Bus Controllers,

here is the script to do sos[br]
[br]

# Get all USB devices

$usbDevices = Get-PnpDevice -Class USB -PresentOnly

# Iterate through each USB device

foreach ($device in $usbDevices) {

# Get the device ID

$deviceId = $device.InstanceId

# Get the registry path for the device's power settings

$regPath = "HKLM:\SYSTEM\CurrentControlSet\Enum\$deviceId\Device Parameters"

# Check if the registry path exists

if (Test-Path $regPath) {

# Set the power management option to unchecked

Set-ItemProperty -Path $regPath -Name "DevicePowerManagementEnabled" -Value 0 -Force

Write-Host "Power management option unchecked for device: $($device.FriendlyName)"

} else {

Write-Host "Registry path not found for device: $($device.FriendlyName)"

}

}

example output [br]
Power management option unchecked for device: Generic SuperSpeed USB Hub

Power management option unchecked for device: USB Composite Device

Power management option unchecked for device: Generic USB Hub

Power management option unchecked for device: Generic USB Hub

Power management option unchecked for device: USB Composite Device

Power management option unchecked for device: USB Composite Device

Power management option unchecked for device: Generic USB Hub

Power management option unchecked for device: USB Root Hub (USB 3.0)

Power management option unchecked for device: Generic SuperSpeed USB Hub

Power management option unchecked for device: Intel(R) USB 3.10 eXtensible Host Controller - 1.20 (Microsoft)

Power management option unchecked for device: USB Composite Device

Power management option unchecked for device: USB Root Hub (USB 3.0)

Power management option unchecked for device: Intel(R) USB 3.10 eXtensible Host Controller - 1.20 (Microsoft)

Power management option unchecked for device: USB Composite Device

Power management option unchecked for device: USB Composite Device

Durum:

open