Hello @Chetan Gawali
I believe you are looking for this:
# Import the CSV file containing the computer name, email, and description columns
$computers = Import-Csv -Path "C:\path\to\computers.csv"
# Loop through each computer in the CSV file
foreach ($computer in $computers) {
# Get the AD computer object by the computer name
$adComputer = Get-ADComputer -Identity $computer.Name
# Update the email and description attributes
Set-ADComputer -Identity $adComputer -EmailAddress $computer.Email -Description $computer.Description
# Output the updated computer name, email, and description
Write-Host "Updated $($adComputer.Name) with email $($computer.Email) and description $($computer.Description)"
}
Ensure the CSV have: Name, Email, and Description columns
I hope this help you.
Regards