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:ScriptsLinkGPO.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 ?
I’m trying to connect several group policies to their OU via Powershellthe command used isNew-GPLink -Name $line.Displayname -Target $line.Target -LinkEnabled $LinkEnable -Order $line.Orderwhere the viariables are read from a csv fileThe command fails with the following errorNew-GPLink : A referral was returned from the server.At D:ScriptsLinkGPO.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 wellconnecting it via the Group Policy Management works indeedany help ? Read More