its not only for the Root Hub
set it for each and every elemeents under Device Manager > Universal Serial Bus Controllers,
here is the script to do sos
- 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
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
Был ли этот ответ полезен?
Проголосовали
Отменить
Оценка
0
Отмена
Прокрутите эту тему, чтобы найти подходящее место для этого комментария. Затем нажмите «Прикрепить комментарий к этому сообщению», чтобы переместить его.