Hi all,
I have a script that imports a csv file. The CSV file has the following headers:
Name,Operating_System,_Domain_,MAC_Address,Vendor
The script then is supposed to use the Get-ADComputer cmdlet to show all the properties of each object in the csv file. The script is below:
$PassportComputers = Import-csv ".\Passport Network Installation.csv"
foreach ($Computer in $PassportComputers)
{
Get-ADComputer -Identity $Computer.Name -Filter *
}However, I get an error like below for each object in the file:
Get-ADComputer : Parameter set cannot be resolved using the specified named parameters.
At PathBlankedOut\PassportNetInstall.ps1:4 char:5
+ Get-ADComputer -Identity $Computer.Name -Filter *
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Get-ADComputer], ParameterBindingException
+ FullyQualifiedErrorId : AmbiguousParameterSet,Microsoft.ActiveDirectory.Management.Commands.GetADComputer