Junior clinched women's tennis program's first win at Stanford since 2014.
Goulak clinched 4-1 victory with remaining matches in third sets.
Vagramov posted team-high sixth clinching win of season.
UCLA will take on Golden Bears Friday (1:30 p.m., PT), Cardinal Saturday (12 p.m.).
Junior posted 4-0 record across singles, doubles matches as Bruins swept local rivals.
No. 2/8 UCLA clinched win at 4-1 before No. 11/17 Pepperdine took final deficit to 4-3.