This seems like it should be simple, but I’m stuck on this.
I have a text file with 8 email addresses.
It does add the new email address to the text file in the correct place. So, now the count should be 9, but when I do a write-host to see the number, it’ telling me 8 when it’s really 9. When I open the text file, I can see it added the new email.
$New_User = Read-Host "Enter new employee's email address" $Read_INI[$Calender_Groups] += "`r`n$New_User" $Read_INI | Set-Content $INI_Location -Force Write-Host $Read_INI[$Users..$Calender_Groups].Count -ForegroundColor Green
Thank you,
Tony