The pasture was surrounded by an 'electric fence'. [=a fence that has an electrical current passing through it]
There's a problem with the building's 'electrical' wiring.
The 'electrical' cord is damaged.