Forum Discussion
Patti Santacroce
Sep 07, 2021Copper Contributor
Policy initiative
I hope someone can help me get this last piece I have been stuck on. I have created about 6 different Tags. I want to create a policy initiative. I can't seem to get this created via PowerShell. I...
BrooksV
May 12, 2022Copper Contributor
It's been over 7 months since you posted this thread and I am sure you figured out how to script a solution by now.
In case others have a similar need to create Policy Initiatives using PowerShell, I hope the attached PowerShell script will be of assistance.
This script supports the following:
- Initiatives based on Custom and Built-In Polices
- Dynamic creation for multiple Assignment Scopes
- Dynamic creation for Parameters and Values including Effect Parameter
- Dynamic creation of Default and Tag specific NonComplianceMessages for Assignments
- Dynamic creation RBAC Role Assignments for Managed Identity when required.
- Modify as well as deployIfNotExists Policies requires RBAC role assignments to be created as part of the Policy Assignment Process
Regards,
BrooksV