Ole Gunnar Solskjaer enjoyed the perfect start to life as Manchester United manager with an emphatic 5-1 victory away at former club Cardiff -- the first time they had scored five since Sir Alex Ferguson's last match in charge in 2013.

Solskjaer was named caretaker manager of United following Jose Mourinho's sacking on Tuesday. One of the question marks over his appointment was a disappointing spell as Cardiff boss, which saw them relegated to the Championship.

One of the criticisms levelled at Mourinho included his unwillingness to pick players from the academy -- and Solskjaer immediately remedied that by including James Garner and Angel Gomes in his first squad.

And he couldn't have wished for a better start as United took the lead within three minutes.

With United's players looking more comfortable on the ball, Paul Pogba won a free kick on the edge of the Cardiff box. The Frenchman looked set to take it before leaving it to Marcus Rashford, who sent a swerving effort past Neil Etheridge.

There was a swagger back to United's play as they dominated possession and were 2-0 ahead on 29 minutes after Ander Herrera's deflected effort found its way into the back of the net.

Despite United's dominance, Cardiff were back in the game on 38 minutes when Rashford was adjudged to have handled and Victor Camarasa pulled a goal back from the penalty spot.

Ole Gunnar Solskjaer celebrates after earning a 5-1 victory in his first match as manager of Manchester United. Stu Forster/Getty Images

However, the visitors ensured they would take a two-goal lead into the break as Anthony Martial finished off a superb passing move including Pogba and Jesse Lingard.

United came out for the second half intent on adding to their advantage as they played with an air of confidence and Pogba almost sent Rashford through with a no-look pass.

And it was 4-1 on 56 minutes as Lingard dusted himself down to stroke home from the penalty spot, having been bundled over in the box.

The style of play was often criticised under Mourinho, but United looked a side transformed in the Welsh capital.

Victor Lindelof epitomised the change in emphasis under Solskjaer as the Sweden international played the ball out of defence before playing in Rashford, who shot wide -- and Pogba then forced a brilliant save from Etheridge with a long-range effort.

Lingard added another in stoppage time as United scored a fifth -- something they had not achieved since Ferguson's final match -- a 5-5 draw at West Brom.

The victory brought United back up to sixth place and eight points behind Chelsea in the final Champions League place, while Cardiff remain two points clear of Burnley in the final relegation place.