I've been trying to test out joining computers to a domain using the command below. My reference for this is from Microsoft, here.
Add-Computer -ComputerName (Get-Content Computers.txt) -Domain IMG.local -Credential IMG\Administrator -Options Win9xUpgrade -Restart
I have "Computers.txt" created with one test computer in it. This text file is located in the same folder where the script is.
Below is my error when running. Any suggestions?
Add-Computer : A parameter cannot be found that matches parameter name 'ComputerName'. At \\imaging\d$\Support\Domain Migration\Join_Domain.ps1:1 char:27+ Add-Computer -ComputerName <<<< (Get-Content Computers.txt) -Domain IMG.local -Credential IMG\Administra tor -Options Win9xUpgrade -Restart+ CategoryInfo : InvalidArgument: (:) [Add-Computer], ParameterBindingException+ FullyQualifiedErrorId : NamedParameterNotFound,Microsoft.PowerShell.Commands.AddComputerCommand