Thursday's verdict also resurrected the club's bid for a lucrative meeting with Celtic in the fifth round.
The Irn-Bru First Division side were kicked out of the cup by a Scottish Football Association emergency committee last week following a number of breaches of the competition rules.
The Pars' expulsion came partly as the result of fielding Calum Woods, who came off the bench in the second half of the 7-1 win over Stenhousemuir on January 9, despite the SFA's official suspensions list declaring him banned for the match.
The club were also punished for further administrative errors during the tie at East End Park, including submitting an inaccurate team line up, altering a named substitute and not registering two outfield under-21 players.
The SFA claimed the integrity of the competition was paramount in their decision to expel Dunfermline from the tournament but the club hit back claiming the punishment was "excessive".
Today's victory was a partial one for the club and director of football Jim Leishman said: "We can still only apologise to the Dunfermline fans that we are in this situation but we are delighted that we are still in the cup.
"Last week, we thought we were out the cup but we got the chance to present our case and we are delighted to have the opportunity to go forward."
He added: "We got a fair hearing.
"We will be making an official statement but, as I say, we can only apologise but we are delighted."
On the £30,000 fine, he said: "That's something that comes with the judgment.
"I can't say too much on that but we are looking forward to the game.
"Stenhousemuir have been magnificent in this.
"They haven't said anything against it, they have went with the judgment."
Scottish Cup. Click here to bet.