From 82fbd7cecebdead38262dafcad73ddc6287315c3 Mon Sep 17 00:00:00 2001 From: Gurpreet Singh Date: Fri, 17 Nov 2023 11:23:51 -0500 Subject: [PATCH] update --- .../Confirm-GSAPrerequisites.psm1 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/GuardrailsSolutionAcceleratorSetup/modules/Confirm-GSAPrerequisites/Confirm-GSAPrerequisites.psm1 b/src/GuardrailsSolutionAcceleratorSetup/modules/Confirm-GSAPrerequisites/Confirm-GSAPrerequisites.psm1 index afa740ac..b3e24aa4 100644 --- a/src/GuardrailsSolutionAcceleratorSetup/modules/Confirm-GSAPrerequisites/Confirm-GSAPrerequisites.psm1 +++ b/src/GuardrailsSolutionAcceleratorSetup/modules/Confirm-GSAPrerequisites/Confirm-GSAPrerequisites.psm1 @@ -184,11 +184,10 @@ Function Confirm-GSAPrerequisites { If ($roleAssignments.id) { Write-Verbose "role assignment: '$roleAssignments.id'" Write-Verbose "Removing role assignment: $(($roleAssignments).id)" - Remove-AzRoleAssignment -RoleDefinitionName '2cb8e1b1-fcf1-439e-bab7-b1b8b008c294' -ObjectId $roleAssignments.id - - # Write-Error "A role assignment exists with the name '2cb8e1b1-fcf1-439e-bab7-b1b8b008c294' at the Management group '$lighthouseTargetManagementGroupID'. This was likely - # created by a previous Guardrails deployment and must be removed. Navigate to the Managment Group in the Portal and delete the Owner role assignment listed as 'Identity Not Found'" - # Exit + # Remove-AzRoleAssignment -RoleDefinitionName '2cb8e1b1-fcf1-439e-bab7-b1b8b008c294' -ObjectId $roleAssignments.id + Write-Error "A role assignment exists with the name '2cb8e1b1-fcf1-439e-bab7-b1b8b008c294' at the Management group '$lighthouseTargetManagementGroupID'. This was likely + created by a previous Guardrails deployment and must be removed. Navigate to the Managment Group in the Portal and delete the Owner role assignment listed as 'Identity Not Found'" + Exit } # check if lighthouse Custom-RegisterLighthouseResourceProvider exists at a different scope