Set-AzPolicyAssignment

Active Directory Auditing Tool

The Who, Where and When information is very important for an administrator to have complete knowledge of all activities that occur on their Active Directory. This helps them identify any desired / undesired activity happening. ADAudit Plus assists an administrator with this information in the form of reports. In real-time, ensure critical resources in the network like the Domain Controllers are audited, monitored and reported with the entire information on AD objects - Users, Groups, GPO, Computer, OU, DNS, AD Schema and Configuration changes with 200+ detailed event specific GUI reports and email alerts.

Object Access » Set-AzPolicyAssignment

How to modify a policy assignment using PowerShell cmdlets.

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:

Set-AzPolicyAssignment -Name <String> [-Scope <String>] [-NotScope <String[]>] [-DisplayName <String>] [-Description <String>] [-Metadata <String>] [-AssignIdentity] [-Location <String>] [-EnforcementMode <PolicyAssignmentEnforcementMode>] [-ApiVersion <String>] [-Pre] [-DefaultProfile <IAzureContextContainer>] [<CommonParameters>]

Example:

$Policy1 = Get-AzPolicyAssignment -Name 'Policy1'
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/.