TestimoX

API Reference

Command

Set-ADXACLInheritance

Namespace ADPlayground.PowerShell
Inputs
System.DirectoryServices.ActiveDirectorySecurity System.DirectoryServices.DirectoryEntry System.String

Sets the ACL inheritance state on an Active Directory security descriptor or entry.

Examples

Authored help example

Example 1: Preview disabling inheritance while preserving inherited ACEs


Set-ADXACLInheritance -ADObject 'OU=Workstations,OU=Managed,DC=contoso,DC=com' -Enable $false -WhatIf
        

Example 2: Disable inheritance and remove inherited ACEs on a service-account OU


Set-ADXACLInheritance -ADObject 'OU=Service Accounts,OU=Tier0,DC=contoso,DC=com' -Enable $false -RemoveInheritedAccessRules
        

Common Parameters

This command supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable.

For more information, see about_CommonParameters.

Syntax

Set-ADXACLInheritance -Security <ActiveDirectorySecurity> -Enable <bool> [-RemoveInheritedAccessRules] [<CommonParameters>]
#
Parameter set: By Security

Parameters

Security ActiveDirectorySecurity requiredposition: 0pipeline: true (ByValue, ByPropertyName)
ActiveDirectorySecurity instance to modify.
Enable bool requiredposition: 1pipeline: false
Enables inheritance when true; disables otherwise.
RemoveInheritedAccessRules SwitchParameter optionalposition: namedpipeline: false
Indicates whether inherited rules should be removed when disabling inheritance.
Set-ADXACLInheritance -Entry <DirectoryEntry> -Enable <bool> [-RemoveInheritedAccessRules] [<CommonParameters>]
#
Parameter set: By Entry

Parameters

Entry DirectoryEntry requiredposition: 0pipeline: true (ByValue, ByPropertyName)
DirectoryEntry object to modify.
Enable bool requiredposition: 1pipeline: false
Enables inheritance when true; disables otherwise.
RemoveInheritedAccessRules SwitchParameter optionalposition: namedpipeline: false
Indicates whether inherited rules should be removed when disabling inheritance.
Set-ADXACLInheritance -ADObject <string> -Enable <bool> [-RemoveInheritedAccessRules] [<CommonParameters>]
#
Parameter set: By ADObject

Parameters

ADObject string requiredposition: 0pipeline: true (ByValue, ByPropertyName)
Distinguished name of the object to modify.
Enable bool requiredposition: 1pipeline: false
Enables inheritance when true; disables otherwise.
RemoveInheritedAccessRules SwitchParameter optionalposition: namedpipeline: false
Indicates whether inherited rules should be removed when disabling inheritance.