I am working on populating the "logonworkstations" attribute with multiple computernames for multiple users. I have a simple script to populate the "logonworkstations" attribute from a csv file but I need some assistance folding in an additional csv file with the users list. any help would be much appreciated. Thanks.. Ryan
Import-Module ActiveDirectory
$complist = Import-Csv -Path "C:\Temp\ComputerList.csv" | ForEach-Object {$_.NetBIOSName}
$UserProperties = Get-AdUser -Identity username -Properties LogonWorkstations
$comparray = ($UserProperties).LogonWorkstations
foreach($comp in $complist){
$comparray += "," + $comp
}
Set-ADUser -Identity username -LogonWorkstations $comparray