![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | how to get logged-in user credentials? 9# [System.Net.CredentialCache]: efaultCredentials | flUserName : Password : Domain : 10# [System.Net.CredentialCache]: efaultNetworkCredentials | flUserName : 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 Specs![]() |
| | #2 (permalink) |
| | Re: how to get logged-in user credentials? Replying to myself here... I found these useful bits in my profile which PSCX put there: Set-PscxVariable NTIdentity ([Security.Principal.WindowsIdentity]::GetCurrent()) Set-PscxVariable NTAccount ($NTIdentity.User.Translate([Security.Principal.NTAccount])) 11# $ntaccount Value ----- EL-GUAPO\Hal -- Hal Rottenberg blog: http://halr9000.com powershell category: http://halr9000.com/article/category...ng/powershell/ |
My System Specs![]() |
| | #3 (permalink) |
| | Re: how to get logged-in user credentials? [Security.Principal.WindowsIdentity]::getcurrent().name "Hal Rottenberg" <hal@xxxxxx> wrote in message news:%23jqEmnd7HHA.4584@xxxxxx Quote: > Replying to myself here... I found these useful bits in my profile which > PSCX put there: > > Set-PscxVariable NTIdentity > ([Security.Principal.WindowsIdentity]::GetCurrent()) > > Set-PscxVariable NTAccount > ($NTIdentity.User.Translate([Security.Principal.NTAccount])) > > 11# $ntaccount > > Value > ----- > EL-GUAPO\Hal > > -- > > Hal Rottenberg > blog: http://halr9000.com > powershell category: > http://halr9000.com/article/category...ng/powershell/ |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Re: Cannot use ie7 when logged on as a standard user?? | Vista security | |||
| Different user credentials | Vista networking & sharing | |||
| User Profile Bad if this user is not first user logged onto Vista | Vista account administration | |||
| Remember last user logged on | Vista account administration | |||
| finding the logged on user (user name) with powershell using WMI? | PowerShell | |||