Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
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.

Go Back   Vista Forums > Misc Newsgroups > PowerShell

Vista - how to know who is the user connected to a specific computer ?

Reply
 
Old 06-30-2007   #1 (permalink)


 
 

how to know who is the user connected to a specific computer ?

Hi everybody, how could i know which user is connected at the moment on a
specific machine ?

I think the WMI could be a solution, but i don't know how to make it
function, and i think they are some other better solutions.

please help me

bye
Nico



My System SpecsSystem Spec
Old 06-30-2007   #2 (permalink)
/\/\o\/\/ [MVP]


 
 

RE: how to know who is the user connected to a specific computer ?

some options :

http://mow001.blogspot.com/2006/02/g...-in-monad.html

gr /\/\o\/\/
http://thePowerShellGuy.com

"Nicopil@mi" wrote:

> Hi everybody, how could i know which user is connected at the moment on a
> specific machine ?
>
> I think the WMI could be a solution, but i don't know how to make it
> function, and i think they are some other better solutions.
>
> please help me
>
> bye
> Nico
>
>
>

My System SpecsSystem Spec
Old 06-30-2007   #3 (permalink)
Olaf Engelke [MVP Windows Server]


 
 

Re: how to know who is the user connected to a specific computer ?

Hello,
<Nicopil@mi> schrieb im Newsbeitrag
news:46868471$0$13209$426a34cc@news.free.fr...
> Hi everybody, how could i know which user is connected at the moment on a
> specific machine ?
>
> I think the WMI could be a solution, but i don't know how to make it
> function, and i think they are some other better solutions.
>

if you have Administrator permissions to that machine with your logged in
account (we use it that way from a server Remotedesktop) and the PCs
firewall is not blocking the attempts you could use following batch:

@echo off
cls
if "%1"=="" GOTO Comment
wmic /node:%1 ComputerSystem GET UserName
goto end
:Comment
Echo Parameter required: Computername
:End

The other way I use, if I'm not Administrator but member of a group, which
is allowed unsolicitated remote assistance I could use the Remote assistance
link either from Help and Support or with a specific link, which is in XP
"hcp://CN=Microsoft%20Corporation,L=Redmond,S=Washington,C=US/Remote%20Assistance/Escalation/Unsolicited/Unsolicitedrcui.htm"
in Vista with
%systemroot%\system32\msra.exe /expert
(Vistas version is instantly trying to connect with this command after you
entered the computer name)
Best greetings from Germany
Olaf

My System SpecsSystem Spec
Old 07-01-2007   #4 (permalink)
Keith Hill [MVP]


 
 

Re: how to know who is the user connected to a specific computer ?

<Nicopil@mi> wrote in message news:46868471$0$13209$426a34cc@news.free.fr...
> Hi everybody, how could i know which user is connected at the moment on a
> specific machine ?
>
> I think the WMI could be a solution, but i don't know how to make it
> function, and i think they are some other better solutions.


gwmi Win32_ComputerSystem -ComputerName foopc1 | select Name,UserName

is probably your best bet.

--
Keith

My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Connecting as a specific user to iMac Vista networking & sharing
Vista permission issue (user/computer specific)...? Vista account administration
What is specific to user accounts? Vista account administration
Cant print from my Vista computer to a printer that is connected to XP computer Vista networking & sharing
DPI setting is not user specific Vista account administration


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46