Ireland went 1-0 up in the fourth minute. Adam Idah raced onto a through pass from Rowan Roache before chipping keeper Anej Mrežar from 20 yards.
Lee O'Connor scored Ireland's second goal in the 27th minute when he was played through and flicked the ball over the keeper before flicking it home.
Dario Kolobarič pulled one back for the home side just before the half-time whistle with a close range header.
Irish keeper Brian Maher made a couple of solid saves early in the second half before O'Connor combined with Luke Nolan to create a decent chance in the 55th minute but O'Connor low effort hit the outside of the Slovenian post.
Idah made it 3-1 to Ireland in the 70th minute to wrap up an excellent afternoon for the Irish with a neat side-footed effort from ten yards out.
Coach Colin O'Brien was pleased with the Irish performance in the first of two friendly games this week.
"There were a lot of good aspects from this game. It was a good opportunity for the players to show what they can do," said O'Brien.
"The game was a good test for the boys, played in a quality venue on an excellent pitch although the heat was also testing.
"We started very well, played good possession football and scored two really good goals. Slovenia scored from a set play just before halftime. In the second half they had a lot of possession so we had to defend and I was very pleased with the challenge. We then scored a very good goal on the break to finish off a good day's work."
REPUBLIC OF IRELAND: Brian Maher, Lee O'Connor, Dominic Peppard, Kameron Ledwidge, Aaron Bolger, Rowan Roache, Jordan Doherty, Sean Brennan, Adam Idah, Calum Thompson, Luke Nolan.
Subs: Cian Lee for Peppard 41 mins; Conor Coventry for Brennan 62, Gavin Kilkenny for Thompson 74, Thomas Caffrey for Idah 75.
RESULTS & FIXTURES
Tuesday, August 9
Slovenia 1-3 Republic of Ireland, National Football Centre, Brdo
Thursday, August 11
Slovenia v Republic of Ireland, National Football Centre, Brdo (9.30am)