def _get_msupdate_status():
 obj_sm = win32com.client.Dispatch('Microsoft.Update.ServiceManager')
 col_services = obj_sm.Services
 for service in col_services:
  if (service.name == 'Microsoft Update'):
   return True
 return False

def _get_msupdate_status ( ) : obj_sm = win32com . client . Dispatch ( 'Microsoft.Update.ServiceManager' ) col_services = obj_sm . Services for service in col_services : if ( service . name == 'Microsoft Update' ) : return True return False
check to see if microsoft update is enabled return boolean .