Forum Discussion

StefanoC66's avatar
StefanoC66
Iron Contributor
May 22, 2024

setting GP Link failure

I'm trying to connect several group policies to their OU via Powershell

the command used is

New-GPLink -Name $line.Displayname -Target $line.Target -LinkEnabled $LinkEnable  -Order $line.Order

where the viariables are read from a csv file

The command fails with the following error

New-GPLink : A referral was returned from the server.
At D:\Scripts\LinkGPO.ps1:17 char:1
+ New-GPLink -Name $line.Displayname -Target $line.Target -LinkEnabled ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [New-GPLink], DirectoryServicesCOMException
+ FullyQualifiedErrorId : System.DirectoryServices.DirectoryServicesCOMException,Microsoft.GroupPolicy.Commands.NewGPLinkCommand

 

I also tried the same command with the explicit path and names but it fails as well

connecting it via the Group Policy Management works indeed

any help ?

 

No RepliesBe the first to reply

Resources