/*   this works only for Express

UPDATE PMD
SET PMD.IsPowerManaged = 1
FROM PowerManagedDevices AS PMD
INNER JOIN PowerPlanConfigurationDeviceLinks AS PPCDL ON PMD.DeviceGuid = PPCDL.DeviceGuid
WHERE PMD.OSVersion LIKE '10.%'
AND PMD.IsPowerManaged = 0

*/

update PowerManagedDevices 
   set 
        IsPowerManaged = 1
 where
        DeviceGuid = @DeviceGuid