delete/remove smb shares from particular domain

New Contributor III

I am looking for a script to remove smb shares that were setup to mount during the login for the users local account.

Our company split apart and we used to setup and have home directories automatically mount using samba during the initial login to the Mac.   System Preferences > Users & Groups > Login Options >  + (add the mapping)

For example the mapped drive for the old company is smb:// using the FQDN.

We are now a different company with a different domain.  The new mapped drive would be smb://

Is there a script I can push out to remove any mappings just for the "old" domain mappings?  We still have some of these on some of our users that work remotely and it's causing performance issues.

Thank You!