diff --git a/src/store/modules/ResourceManagement/PowerControlStore.js b/src/store/modules/ResourceManagement/PowerControlStore.js
index 9dbddf0..94c570f 100644
--- a/src/store/modules/ResourceManagement/PowerControlStore.js
+++ b/src/store/modules/ResourceManagement/PowerControlStore.js
@@ -5,15 +5,18 @@
   namespaced: true,
   state: {
     powerCapValue: null,
+    powerCapUri: '',
     powerConsumptionValue: null,
   },
   getters: {
     powerCapValue: (state) => state.powerCapValue,
+    powerCapUri: (state) => state.powerCapUri,
     powerConsumptionValue: (state) => state.powerConsumptionValue,
   },
   mutations: {
     setPowerCapValue: (state, powerCapValue) =>
       (state.powerCapValue = powerCapValue),
+    setPowerCapUri: (state, powerCapUri) => (state.powerCapUri = powerCapUri),
     setPowerConsumptionValue: (state, powerConsumptionValue) =>
       (state.powerConsumptionValue = powerConsumptionValue),
   },
@@ -21,15 +24,29 @@
     setPowerCapUpdatedValue({ commit }, value) {
       commit('setPowerCapValue', value);
     },
-    async getPowerControl({ commit }) {
+    async getChassisCollection() {
       return await api
-        .get('/redfish/v1/Chassis/chassis/Power')
+        .get('/redfish/v1/')
+        .then((response) => api.get(response.data.Chassis['@odata.id']))
+        .then(({ data: { Members } }) =>
+          Members.map((member) => member['@odata.id'])
+        )
+        .catch((error) => console.log(error));
+    },
+    async getPowerControl({ dispatch, commit }) {
+      const collection = await dispatch('getChassisCollection');
+      if (!collection || collection.length === 0) return;
+      return await api
+        .get(`${collection[0]}`)
+        .then((response) => api.get(response.data.Power['@odata.id']))
         .then((response) => {
           const powerControl = response.data.PowerControl;
+          if (!powerControl || powerControl.length === 0) return;
+          const powerCapUri = powerControl[0]['@odata.id'];
           const powerCap = powerControl[0].PowerLimit.LimitInWatts;
           // If system is powered off, power consumption does not exist in the PowerControl
           const powerConsumption = powerControl[0].PowerConsumedWatts || null;
-
+          commit('setPowerCapUri', powerCapUri);
           commit('setPowerCapValue', powerCap);
           commit('setPowerConsumptionValue', powerConsumption);
         })
@@ -37,13 +54,12 @@
           console.log('Power control', error);
         });
     },
-    async setPowerControl(_, powerCapValue) {
+    async setPowerControl({ state }, powerCapValue) {
       const data = {
         PowerControl: [{ PowerLimit: { LimitInWatts: powerCapValue } }],
       };
-
       return await api
-        .patch('/redfish/v1/Chassis/chassis/Power', data)
+        .patch(state.powerCapUri, data)
         .then(() =>
           i18n.t('pageServerPowerOperations.toast.successSaveSettings')
         )
