This is the Salzburg Fort. You can walk up to it. You can even follow the signs to the funicular, end up on the now-abandoned midway platform where the funicular doesn't stop, walk up the last bit, realize that you're one euro short of the admission fee and that they don't take any cards and walk down promising yourself that the fortress will be among the first buildings to go once nuclear weapons become ubiquitous, but once you hit ground level again you'll probably just gorge youself silly on pastries. Then you take the funicular up.
The only time the fortress was beseiged was in 1525 when a group of miners and townspeople tried to oust Prince Archbishop Cardinal Matthäus Lang. The fort was surrendered without a fight during the Napoleonic Wars, by which time it had ceased to have any military significance.