Hello
I'm trying to pass another credential than the initiator, to add a member to a group.
$Server = $Context.GetObjectDomain("%distinguishedName%")
$Secpasswd = ConvertTo-SecureString "VeryWeakPassword" -AsPlainText -Force
$Credential = New-Object System.Management.Automation.PSCredential ("shadowuser@mydiom.local", $Secpasswd)
Add-AdmGroupMember -Identity "TheGroup" -Members "JohnDoe" -AdaxesService localhost -Server $Server -Confirm:$False -Credential $Credential
The user is added to the group allright, but I get this error:
"Cannot process argument transformation on parameter 'Credential'. Cannot invoke this function because the current host does not implement it."
- Thanks