I think that this is what you're ultimately after...

Code:

$user_dep = GetObject("LDAP://CN=USERNAME,OU=users,DC=aaa,DC=com").Department
use g: "\\server\" + $user_dep + "$"