diff --git a/lib/bmc_redfish_utils.py b/lib/bmc_redfish_utils.py
index 872a998..f492312 100644
--- a/lib/bmc_redfish_utils.py
+++ b/lib/bmc_redfish_utils.py
@@ -167,7 +167,8 @@
             self.walk_nested_dict(self._rest_response_.dict)
         return list(sorted(self.__pending_enumeration))
 
-    def enumerate_request(self, resource_path, return_json=1):
+    def enumerate_request(self, resource_path, return_json=1,
+                          include_dead_resources=False):
         r"""
         Perform a GET enumerate request and return available resource paths.
 
@@ -177,6 +178,8 @@
         return_json                 Indicates whether the result should be
                                     returned as a json string or as a
                                     dictionary.
+        include_dead_resources      Check and return a list of dead/broken URI
+                                    resources.
         """
 
         gp.qprint_executing(style=gp.func_line_style_short)
@@ -198,6 +201,9 @@
         # Variable having resources for which enumeration is completed.
         enumerated_resources = set()
 
+        if include_dead_resources:
+            dead_resources = {}
+
         resources_to_be_enumerated = (resource_path,)
 
         while resources_to_be_enumerated:
@@ -213,6 +219,13 @@
                 # Enumeration is done for available resources ignoring the
                 # ones for which response is not obtained.
                 if self._rest_response_.status != 200:
+                    if include_dead_resources:
+                        try:
+                            dead_resources[self._rest_response_.status].append(
+                                resource)
+                        except KeyError:
+                            dead_resources[self._rest_response_.status] = \
+                                [resource]
                     continue
 
                 self.walk_nested_dict(self._rest_response_.dict, url=resource)
@@ -222,10 +235,17 @@
                 tuple(self.__pending_enumeration - enumerated_resources)
 
         if return_json:
-            return json.dumps(self.__result, sort_keys=True,
-                              indent=4, separators=(',', ': '))
+            if include_dead_resources:
+                return json.dumps(self.__result, sort_keys=True,
+                                  indent=4, separators=(',', ': ')), dead_resources
+            else:
+                return json.dumps(self.__result, sort_keys=True,
+                                  indent=4, separators=(',', ': '))
         else:
-            return self.__result
+            if include_dead_resources:
+                return self.__result, dead_resources
+            else:
+                return self.__result
 
     def walk_nested_dict(self, data, url=''):
         r"""
