This topic contains 5 replies, has 5 voices, and was last updated by
July 23, 2015 at 9:47 am #27810ParticipantTopics: 2Replies: 1Points: 1Rank: Member
I'm trying to come up with a way to get a display or friendly name for a local user logged into their PC.
July 26, 2015 at 3:20 pm #27895ParticipantTopics: 6Replies: 236Points: 0Rank: Member
Can you give a little more information on what you're ultimately trying to accomplish? Are you trying to create a "Hello Tim" message? Are these accounts local to the machine, or are they domain accounts?
July 27, 2015 at 8:50 am #27919ParticipantTopics: 0Replies: 1Points: 0Rank: Member
This has been working for me
Get-WmiObject -class "win32_computersystem" -namespace "root\CimV2" -ComputerName $ComputerName | Select username
July 27, 2015 at 9:47 am #27928ParticipantTopics: 50Replies: 121Points: 63Rank: Member
I'm using this for local user:
And this for domain user:
And I want to know what do you want to achieve too =p
July 27, 2015 at 12:10 pm #27931ParticipantTopics: 6Replies: 236Points: 0Rank: Member
And while both of those will give a user name, I wanted to know more about Tim's intention. If he's interested in local accounts, there really is no concept of a display name or friendly name in the LSA.
July 28, 2015 at 4:16 am #27945ParticipantTopics: 2Replies: 376Points: 0Rank: Member
Local accounts have FullName or Description
$u = [adsi]"WinNT://$env:Computername/Administrator"
The topic ‘Local Logged In User’ is closed to new replies.