Step 1: Solving the inequality.
The function \( f(x) = x^2 - 6x + 8 \) is a quadratic function, and we need to find where it is positive. First, solve \( f(x) = 0 \):
\[
x^2 - 6x + 8 = 0
\]
Factoring gives:
\[
(x - 2)(x - 4) = 0
\]
Thus, \( x = 2 \) and \( x = 4 \) are the roots of the equation.
Step 2: Analyzing the function.
Since the parabola opens upwards (positive coefficient for \( x^2 \)), the function is positive when \( x>4 \) or \( x<2 \). The correct answer is therefore (D).