I thought I'd written about this earlier, but I searched today and couldn't find it.
My customer has a fidgety business-specific printer that doesn't seem to care for USB selective suspend. They wanted to turn it off for all of their print machines with a GPO.
Windows includes the PowerCfg.exe tool for configuring power management.
To Change a single setting in a Windows 7 power plan for AC mode run:
PowerCfg.exe -setacvalueindex (Guid of Power Plan) (Guid of Category) (Guid of Setting) (Value)
To Change a single setting in a Windows 7 power plan for DC/Battery mode run:
PowerCfg.exe -setdcvalueindex (Guid of Power Plan) (Guid of Category) (Guid of Setting) (Value)
My power plan is set to the out-of-box High Performance profile.
I run PowerCfg.exe /L to list the guids of my power plans.
I run PowerCfg.exe /Q to list the categories, settings, and values available in the power plans.
8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c (High Performance)
2a737441-1930-4402-8d77-b2bebba308a3 (USB settings)
48e6b7a6-50f5-4782-a5d4-53bb8f07e226 (USB selective suspend setting)
So, for me, to Disable selective suspend on Windows 7 in the High Performance Power plan when plugged in, I run:
I ran ProcMon while running this and found it creates a single registry entry:
... and that's what goes in the GPO. Magic.
Note: The procedure is different for Windows 7 and XP. The above is Win7+. If you need to change it on XP then use the following registry key per MS kb895962
Value: 1 disables selective suspend mode. 0 enables selective suspend mode.