Hello everyone, I'm trying to update the description attribute for all the user's on our domain. Using a do while loop I'm reading in each username and description from a spreadsheet. During the loop after I get the info about the user then I'm run a filter to get the user via their username. However, some user's already have a description. These were done manually in the past and I want to ignore them. I've tried to account for that in the line below however on the 5 accounts I'm testing against it's only altering the same user each time. It's ignoring the other 4 users. Only 1 of these user's already have a description and it's one of the 4 that's not being altered. Any ideas what I might be doing wrong?
Get-ADUser -Filter {(userPrincipalName -Like $userPrincipalName) -and (description -notlike "*")} | Set-ADUser -Description $description