Remove-PSGPOLink¶
Deletes the links of GPOs to the domain or to an OU, as GPMC "Delete" on a link.
The help of the command, as Get-Help Remove-PSGPOLink -Full gives it.
Syntax¶
Remove-PSGPOLink [-Name] <string[]> [-Target] <string> [[-Directory] <GPOToolsDirectory>] [[-Server] <string>] [-WhatIf] [-Confirm] [<CommonParameters>]
Description¶
The GPO itself is kept, with its other links; the links after it move up one link order. The change is refused when the links changed in the domain meanwhile.
Parameters¶
-Name¶
Display names of the GPOs (* and ? make a pattern).
| Type | Required | Position | Default value | Accepts pipeline input |
|---|---|---|---|---|
String[] |
Yes | 1 | None | Yes |
-Target¶
The domain or the OU: its distinguished name, the name of the domain, or the name of an OU when only one OU has it.
| Type | Required | Position | Default value | Accepts pipeline input |
|---|---|---|---|---|
String |
Yes | 2 | None | No |
-Directory¶
Directory of the domain (Get-PSGPODirectory); the domain is read when not given.
| Type | Required | Position | Default value | Accepts pipeline input |
|---|---|---|---|---|
GPOToolsDirectory |
No | 3 | None | No |
-Server¶
Domain controller to read the domain from, without -Directory.
| Type | Required | Position | Default value | Accepts pipeline input |
|---|---|---|---|---|
String |
No | 4 | None | No |
-WhatIf¶
| Type | Required | Position | Default value | Accepts pipeline input |
|---|---|---|---|---|
SwitchParameter |
No | Named | None | No |
-Confirm¶
| Type | Required | Position | Default value | Accepts pipeline input |
|---|---|---|---|---|
SwitchParameter |
No | Named | None | No |