We show that Shelah cardinals are preserved under the canonical $${{\mathrm{GCH}}}$$ GCH forcing notion. We also show that if $${{\mathrm{GCH}}}$$ GCH holds and $$F:{{\mathrm{REG}}}\rightarrow {{\mathrm{CARD}}}$$ F : REG → CARD is an Easton function which satisfies some weak properties, then there exists a cofinality preserving generic extension of the universe which preserves Shelah cardinals and satisfies $$\forall \kappa \in {{\mathrm{REG}}},~ 2^{\kappa }=F(\kappa )$$ ∀ κ ∈ REG , 2 κ = F ( κ ) . This gives a partial answer to a question asked by Cody (Arch Math Logic 52(5–6):569–591, 2013) and independently by Honzik (Acta Univ Carol 1:55–72, 2015). We also prove an indestructibility result for Shelah cardinals.