How to modify a policy assignment using PowerShell cmdlets.
Written by Titus Manohar, IT security team, ManageEngine Updated on September 2025
Description:
Executing this cmdlet alters a policy assignment. You can use either the name or Id to specify the policy assignment that you wish to modify.
Syntax:
Example:
Set-AzPolicyAssignment -Id $Policy1.ResourceId -AssignIdentity -Location 'southus'
In this example, the Get-AzPolicyAssignment cmdlet fetches the policy assignment named "Policy1" from the current subscription and stores it in the $Policy1 variable. The Set-AzPolicyAssignment cmdlet assigns the managed identity "Location" to the Policy1 policy assignment.
About ADAudit Plus
ADAudit Plus is a UBA-driven change auditor that helps keep your Active Directory, Azure AD, Windows file servers, NetApp filers, EMC file systems, Synology file systems, Windows member servers, and workstations secure and compliant. For more information on ADAudit Plus, visit https://www.manageengine.com/active-directory-audit/.
Explore Active Directory auditing and reporting with ADAudit Plus.
- Related Products
- ADManager Plus Active Directory Management & Reporting
- ADAudit Plus Real-time Active Directory Auditing and UBA
- EventLog Analyzer Real-time Log Analysis & Reporting
- ADSelfService Plus Self-Service Password Management
- AD360 Integrated Identity & Access Management
- Log360 (On-Premise | Cloud) Comprehensive SIEM and UEBA
- AD Free Tools Active Directory FREE Tools
