I want to add/update data of Active Directory located on another server. I have server details but I don\'t know how to do it. However, I know how to add/update data if I run Po
You need to include the -Server <string>
parameter for connecting to another server before creating / validating the user.
Also, I think you meant -Filter
as the parameter with Get-ADUser cmdlet
, and not -F.
-Server
Specifies the Active Directory Domain Services instance to connect to, by providing one of the following values for a corresponding domain name or directory server. The service may be any of the following: Active Directory Lightweight Domain Services, Active Directory Domain Services or Active Directory Snapshot instance. ...
Get-ADUser -Filter {SamAccountName -eq $Username} -Server a.b.c.d ...
# reference from https://docs.microsoft.com/en-us/powershell/module/addsadministration/get-aduser?view=win10-ps
New-ADUser ... -Server a.b.c.d ...
# reference from https://technet.microsoft.com/fr-fr/library/hh852238(v=wps.630).aspx