Jump to content

Powershell script to disable devices power settings

Recommended Posts

Hello all

I am not sure how many of you dislike the idea of having to check USB / network hubs power settings every time windows has an update or you connect and reconnect devices. I personally find it a PITA. 

I did some research and came over a powershell script to do exactly that; I readapted it to cover USB Hubs, USB Connectors and Network cards. 

Placed it somewhere in your computer (i.e. C:\). You need to be in the directory you placed the script for it to work...

Then run powershell in admin mode (right click on the start button --> Windows Powershell (admin) --> go to the location you placed the script (i.e. cd c:\) --> type "& '.\Disable Power Schedule.ps1'

It works very well :), and saves a ton of time especially if you have many USB devices like I do. 

Fell free to use it


Disable Power Schedule.ps1

Edited by Nicolas Morales
  • Like 1
  • Thanks 2

Share this post

Link to post
Share on other sites

Thanks for that.

I made a few small changes.

I added  'echo $IN' in the for loops and a final 'pause' to see the results.

I needed to run:

 Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process -Force

in the powershell console first, because I have script execution disabled.


  • Great Idea 1

Share this post

Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now

  • Create New...