View Single Post
Old 09-02-2007   #1 (permalink)
Hal Rottenberg


 
 

how to get logged-in user credentials?

9# [System.Net.CredentialCache]:efaultCredentials | fl

UserName :
Password :
Domain :

10# [System.Net.CredentialCache]:efaultNetworkCredentials | fl

UserName :
Password :
Domain :

The above were my best guess so far, but they're blank!

Maybe I'm trying too hard; env:USERNAME and env:USERDOMAIN will get me
two-thirds of the way there.

--

Hal Rottenberg
blog: http://halr9000.com
powershell category:
http://halr9000.com/article/category...ng/powershell/
My System SpecsSystem Spec