You could have them striped and rebuilt only painting the rims and hubs or you could paint the whole assembeld wheels coating the spokes, hubs and rims. The choice is yours.
It won't damage them per se, but it may not give the result you want, if it's just cosmetic? Unless they're stainless spokes (and then why would you want to coat them..) they are almost certainly galvanised, and the curing temperature of the powder coating will almost certainly cause some out-gassing as you'll have oxides and other things lurking in the surface. Which will probably lead to poor adhesion, peeling, lumps, and cracks on the powder coating.
New spokes are relatively inexpensive, and wheel building is not that dear either. May I ask why you want to coat them? Curious...
Thanks for your replies, I'm having them coated because previous owner didn't look after it and they look a mess,also having paint job done and want wheels to look as good as the rest of the bike