Thanks for the model year info. Knowing the exact model year is very important. Just like automobiles from year to year...computer models can change drastically from year to year. The difference between a 2011 21.5" iMac and a 2012 model can be huge.
As far as difficulty to switch out the power supply in an iMac. Again the definition of "easy" is different for different people. I consider swapping out the RAM in a 27" iMac to be easy. Switching out the power supply on ANY computer will not be "easy" (not easy like swapping out RAM on a 27" iMac).
If this is a 2011 21.5" iMac...I would not say swapping out the power supply is easy...but I wouldn't say it's super hard for an experienced person to do either (depends on a persons mechanical abilities & experience). Here's the ifixit.com procedure for replacing the power supply on a 2011 21.5" iMac"
iMac Intel 21.5" EMC 2428 Power Supply Replacement - iFixit Repair Guide
- Nick