Rad has a point here, implicit though it is....

What are you gathering this information for? Is it for an admin script (where you might be running this against many accounts) or a logon script (where you might be running this against one user)?