Yes it can.
I have my bluray player, DVD player, Sattilite box and Apple TV set up like this. When you program the remote you tell it which components you want turned on for each item ( watching TV, Listening to music, watching a bluray, etc). So if your watching TV and decide you want to listen to some tunes you just push the button you have programmed for listening to music and the remote will turn off the equipment not required and turn on those that are.
Mel
For the Harmony one at least