Hi,
Try running these commands one by one.
Get-MailContact -ResultSize unlimited -OrganizationalUnit "test.com/GALS/contacts" -Filter {LegacyExchangeDN -eq $null } | ? {$_.DisplayName -match "^[A-D]"} | Update-Recipient
Get-MailContact -ResultSize unlimited -OrganizationalUnit "test.com/GALS/contacts" -Filter {LegacyExchangeDN -eq $null } | ? {$_.DisplayName -match "^[E-H]"}| Update-Recipient
Get-MailContact -ResultSize unlimited -OrganizationalUnit "test.com/GALS/contacts" -Filter {LegacyExchangeDN -eq $null } | ? {$_.DisplayName -match "^[I-L]"} | Update-Recipient
Get-MailContact -ResultSize unlimited -OrganizationalUnit "test.com/GALS/contacts" -Filter {LegacyExchangeDN -eq $null } | ? {$_.DisplayName -match "^[M-P]"} | Update-Recipient
Get-MailContact -ResultSize unlimited -OrganizationalUnit "test.com/GALS/contacts" -Filter {LegacyExchangeDN -eq $null } | ? {$_.DisplayName -match "^[Q-T]"} | Update-Recipient
Get-MailContact -ResultSize unlimited -OrganizationalUnit "test.com/GALS/contacts" -Filter {LegacyExchangeDN -eq $null } | ? {$_.DisplayName -match "^[U-X]"} | Update-Recipient
Get-MailContact -ResultSize unlimited -OrganizationalUnit "test.com/GALS/contacts" -Filter {LegacyExchangeDN -eq $null } | ? {$_.DisplayName -match "^[Y-Z]"} | Update-Recipient
Then update this GAL.
Update-GlobalAddressList -Identity "GAL"
Best Regards.