Currently using a script to set a property on a single computer works well, but now I have a list I need to set and do not have the time to do it manually for each one. Any help on a foreach and/or loop script would be helpful.
Single line script: *disregard "property" and "objectprop"
function set-"Property" {
$computer= Read-Host "Computer name"
$"Property" = Read-Host "'Property'"
Set-QADComputer -Identity $computer -ObjectAttributes @{"objectprop" = $"property"} -Proxy
Get-QADComputer $computer -IncludedProperties "objectprop" |select name, "objectprop"
}
I have an excel file with the computer in 1 column and the corresponding property needing to be set in another column.
Any help/advice greatly appreciated