Scenario
in AD, I have a user named Nykkie, who has a direct report property called Rebecca
My attempt 1
I tried to replace it with jamesc via powershell, but getting below error:
PS C:Windowssystem32> get-aduser NykkieG | Set-ADUser -directreports jamesc
Set-ADUser : A parameter cannot be found that matches parameter name ‘directreports’.
At line:1 char:39
get-aduser NykkieG | Set-ADUser -directreports jamesc
~~~~~~~~~~~~~~
CategoryInfo : InvalidArgument: (:) [Set-ADUser], ParameterBindingException
FullyQualifiedErrorId :
NamedParameterNotFound,Microsoft.ActiveDirectory.Management.Commands.SetADUser
My attempt 2
get-aduser NykkieG | Set-ADUser -manager jamesc
it worked, but it did not change the “direct report” field
Any advice or workaround ?