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