Your copy of Windows is locked to the PC on which you purchased it. You cannot transfer that license to another PC.
You can upgrade any components or peripherals on your PC and keep your license intact. You can replace the motherboard with an identical model or an equivalent model from the OEM if it fails. However, if you personally replace or upgrade the motherboard, your OEM Windows license is null and void.
Most of the time Microsoft is lenient about reactivating an OEM license as long as it is only being used on a single system - By the letter of the EULA it dies with the first system that it was installed on but if asked they will sometimes make exceptions and reactivate (normally the auto activation process by phone will reactivate the license just fine as long as it has not been reactivated recently and their server records do not show that key in use on several systems) -- Figure they are more concerned with keeping companies etc. from using hundreds or thousands of copies illegally than they are about a home user reactivating an OEM license on a new system after upgrading so will usually make an exception in these cases rather than being strict about the license not being reuseable.
It's a custom built pc not an upgrade.Nothing on the new pc is connected to the oem license , therefore not valid.
You can't just build a new computer and grab a windows 7 oem license from say a dell,hp,gateway,etc. that is not running and use it,that is illegal.
If it's a non prebuilt oem license from say newegg , microsoft may work with you.If it's a branded oem , they won't allow it.
It's not illegal if Microsoft or an employee of Microsoft reactivates the product license - License terms are negotiated constantly and by them providing reactivation of the OEM license the end result is a perfectly valid and fully Legal installation -- As long as you do not lie to them when trying to activate if the auto activation or the manual activation by a CS agent of MS passes the required Microsoft validation or they give you a valid activation response code then there is nothing "illegal" about it !