Snag might be Activation as the drive will have activated on one machine and will be at odds with the replacement, though a call to M'soft might help. Swapping the drives should work,but to future-proof your setup it would be best to create a full backup. If the failed machine runs at all you could create a System Image and 'Restore' it to your new one. You'll need two USB external devices ideally or one USB and a blank CD
Plug in Ext USB Drive 1
On Start Screen type 'File Recovery'
From Settings choose Windows 7 File Recovery
Choose Create System Image (Top Left)
On completion, on Start Screeen type 'Recovery Drive'
From settings choose 'create Recovery Drive'
I never bothered with the Recovery Partition, but the option is there.
Choose boot from USB/DVD (depending on your Recovery Media) on your machine and boot with just the Recovery Drive/disk in place.
Choose your Keyboard, then Troubleshoot your PC
Advanced Options
System Image recovery
Plug in System Image drive when prompted (ie when it can't be found!)
Fingers crossed! I've used this method successfully when wanting to exchange an HDD for an SSD, so it should do what you desire