Hi,
I have a process that adds a member in a existing AD group and I'm using "Execute Windows PowerShell Script" activity to do so as below:
$gr = $args[0]
$usr = $args[1]
Add-ADGroupMember -Identity $gr -Members $usr
Half of the time it runs fine, but the other half it fails with this error:
Add-ADGroupMember : Unable to contact the server. This may be because this server does not exist, it is currently down, or it does not have the Active Directory Web Services running.At C:\Windows\Temp\PO_WorkingDir_1cd9b04a-1486-43e7-848f-2ff8165a0877\PO_PSScript_1cd9b04a-1486-43e7-848f-2ff8165a0877.ps1:3 char:1+ Add-ADGroupMember -Identity $gr -Members $usr+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : ResourceUnavailable: (luimar admin test:ADGroup) [Add-ADGroupMember], ADServerDownExcept ion + FullyQualifiedErrorId : ActiveDirectoryServer:0,Microsoft.ActiveDirectory.Management.Commands.AddADGroupMember
Orchestrator: 3.0.0.1090
Windows 2012
AD Server Windows 2012
Does anyone experienced this before?
Any help appreciated.
Thanks
Lui