API Reference
Command
Remove-ADXGpoBrokenLink
Removes orphaned GPO links (container gPLink entries that reference nonexistent GPOs) with optional -Max and safety prompts.
Examples
Example 1: Preview removal of up to five broken links per domain
Remove-ADXGpoBrokenLink -Max 5 -WhatIf
Example 2: Remove broken links only in the production domain after review
Remove-ADXGpoBrokenLink -DomainName 'contoso.com' -Max 20 -Confirm:$false
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
Remove-ADXGpoBrokenLink [-DomainName <string[]>] [-Max <int>] [<CommonParameters>]#Parameters
- DomainName string[]
- Optional list of domain DNS names to clean; defaults to all domains in the forest.
- Max int
- Remove at most this many broken links from each domain. Use 0 for no limit.
Outputs
System.Int32