Skip to main content

Update-BrokenInheritance

SYNOPSIS

Finds and fixes users with broken inheritance.

SYNTAX

Update-BrokenInheritance [[-SearchBase] <String>] [[-Identity] <String>]
[<CommonParameters>]

DESCRIPTION

Will search Active Directory for users that do not have permissions inheritance enabled and then fix the inheritance.

EXAMPLES

EXAMPLE 1

Update-BrokenInheritance -Identity "CN=Joe Snuffy,CN=Users,DC=keldor,DC=dev"
Will fix the broken inheritance on the user Joe Snuffy.

EXAMPLE 2

Update-BrokenInheritance -SearchBase "CN=Users,DC=keldor,DC=dev"
Will fix the broken inheritance on all users in the Users OU.

PARAMETERS

-SearchBase

Specify the OU to search using the distinguishedName of the OU. If not specified it searches the whole domain.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: (Get-ADDomain).DistinguishedName
Accept pipeline input: False
Accept wildcard characters: False

-Identity

Specify a user to fix the inheritance on. Can use sAMAccountName or distinguishedName. If no user is specified it will find all users with broken inheritance.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

System.String

NOTES

ALIASES

None.

PLATFORM APPLICABILITY

Windows only. The platform-aware loader does not export this command on Linux or macOS.

POWERSHELL COMPATIBILITY

See PowerShell compatibility for the supported runtime policy. PowerShell 7.6 LTS is preferred.

https://docs.keldor.dev/powershell/keldor/Update-BrokenInheritance