In Exchange 2016 or even Exchange 2019, when you run cmdlets like Get-TransportServer you will receive a nice yellow warning to use the newer cmdlets. So Get-TransportServer has changed to Get-TransportService.
If you head over to the event logs, the application log, you will notice that if you have a script that runs you will receive a warning each time and Event ID 2004 will log as shown below:
If you are running coexistence with Exchange 2010, obviously the script will use the older commands however if you are running Exchange 2016 or Exchange 2019 without coexistence then you should update your scripts to use the newer commands, remember you only have the mailbox role in the newer versions of Exchange and everything else is a service now.
Hope it helps.