The IR remote often works without modification unless someone has messed with it to change it from the default code set (this may be done if there are multiple DISH receivers or if there is a conflict with another piece of equipment).
The manuals can be very helpful:
In addition to programming, they also cover how to identify how the remote is currently configured and/or needs to be configured to work with a particular receiver.
This varies widely from model to model. My 508 is pretty much toast and I disconnected it before deactivating it. It will tune a handful of "channels" but the recorded content cannot be accessed.They should have let him keep the 522, if it is a purchased receiver, and obsolete. It would still work for anything that was already recorded on it, and it might still work to receive some programming. I still use a deactivated 501, and it still gets a few channels, even several years after I deactivated it.