A command that has been deprecated in a release or in a particular configuration mode returns a notice when you issue the command manually:
A preferred alternate command is provided in the notice. If you have a script that uses the deprecated command, the deprecated command is automatically mapped to the preferred command when you run the script. If the deprecated command no longer has a function, then that command has no effect when you run a script containing the command.
We recommend that you use the preferred command when writing new scripts.