There's a chance it can harm the PC. There are a few things that can happen: if there's no hardware damage there can still be problems in Windows caused by the abrupt shutdowns which might require correction. Of course there's also the more serious danger of hardware damage.
There are protective devices, called UPS (Uninterruptible Power Supplies) which looks like a big box that plugs into your wall outlet and offers it's own plugs a bit like a really fat power strip. IT's not just a power strip because that bulk contains a large battery which can power the PC for a short time. It's not meant to run a full PC load for extended periods like a laptop but it gives you a chance to properly shut down Windows (it comes with software...