Example 2 Find all positive integers $n$, such that the product of all positive divisors of $n$ is $n^{3}$.
[1]
(2013, Croatian Mathematical Competition)
Let $1\alpha_{2}>\cdots>\alpha_{k}$.
Then $\tau(n)=\prod_{i=1}^{k}\left(1+\alpha_{i}\right)=6$
$\Rightarrow k=1, \alpha_{1}=5$ or $k=2, \alpha_{1}=2, \alpha_{2}=1$.
Thus, $n=p^{5}$ or $n=p^{2} q(p, q$ being primes $)$ are all the solutions.