We help IT Professionals succeed at work.

Find who are all connected to a machines network card

731 Views
Last Modified: 2008-04-24
Hi,

Can i find who all are connected to a machines network card in any way shares,mstsc,c$ or any session.

Regards
Sharath
Comment
Watch Question

Commented:
go to the PC you want to check on and right click my computer, Manage, Shared folders, the go to open files. It will give you a list of open files and who has them open :0)

Author

Commented:
Can i do this remotely with a script which will give the results to a file.
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2011

Commented:
PsLoggedOn v1.33
http://www.microsoft.com/technet/sysinternals/utilities/psloggedon.mspx

psloggedon.exe \\PCNAME >>c:\Logons.txt

Author

Commented:
From a file of machine names?
Can we get this command to a bat file to execute?
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2011

Commented:
That command doesnt work well off of flat files for PC Names....

In combination with PsExec though, might work....

Copy the following into a batch file....
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
echo %date% %time% %computername% >>\\server\share\logons.txt
psloggedon >>\\server\share\logons.txt
exit
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Save it as logons.bat

Then try this....

psexec @c:\names.txt -d -c logons.bat

Author

Commented:
I get this


PsLoggedOn v1.31 - Logon Session Displayer
Copyright (C) 1999-2003 Mark Russinovich
Sysinternals - www.sysinternals.com

Connecting to Registry of \\PCNAME...
                                                                             
Error opening HKEY_USERS for \\PCNAME
Make sure that the Remote Registry service is started on \\PCNAME.
Unable to query resource logons

PsLoggedOn v1.31 - Logon Session Displayer
Copyright (C) 1999-2003 Mark Russinovich
Sysinternals - www.sysinternals.com

Checking ACCAPP...Connecting to Registry of ACCAPP...
                                                                             
Checking ACCDB...Connecting to Registry of ACCDB...
PsLoggedOn v1.31 - Logon Session Displayer
Copyright (C) 1999-2003 Mark Russinovich
Sysinternals - www.sysinternals.com

Checking ACCAPP...Connecting to Registry of ACCAPP...
                                                                             
Checking ACCDB...Connecting to Registry of ACCDB...
                                                                             
Error opening HKEY_USERS for ACCDB
Make sure that the Remote Registry service is started on ACCDB.
Unable to query resource logons
Checking ACCES...Connecting to Registry of ACCES...
                                                                             
Checking ACCINT...Connecting to Registry of ACCINT...
                                                                             
Checking BOUNDSCHECKERV0...Connecting to Registry of BOUNDSCHECKERV0...
                                                                             
Checking BP-DB-VDEV01...Connecting to Registry of BP-DB-VDEV01...
                                                                             
Checking BP-DB-VDEV03...Connecting to Registry of BP-DB-VDEV03...
                                                                             
Checking BP-DB-VQA01...Connecting to Registry of BP-DB-VQA01...
                                                                             
Checking BP-DB-VQA02...Connecting to Registry of BP-DB-VQA02...
                                                                             
Checking BP-DB-VQA03...Connecting to Registry of BP-DB-VQA03...
                                                                             
Checking BP-DCT-VDEV01...Connecting to Registry of BP-DCT-VDEV01...
                                                                             
Checking BP-ES-VDEV01...Connecting to Registry of BP-ES-VDEV01...
                                                                             
Checking BP-ES-VDEV02...Connecting to Registry of BP-ES-VDEV02...
                                                                             
Checking BP-ES-VDEV03...Connecting to Registry of BP-ES-VDEV03...
                                                                             
Checking BP-ES-VDEV04...Connecting to Registry of BP-ES-VDEV04...
                                                                             
Checking BP-ES-VDEV05...Connecting to Registry of BP-ES-VDEV05...
                                                                             
Checking BP-ES-VQA01...Connecting to Registry of BP-ES-VQA01...
                                                                             
Error opening HKEY_USERS for BP-ES-VQA01
Make sure that the Remote Registry service is started on BP-ES-VQA01.
Unable to query resource logons
Checking BP-ES-VQA02...Connecting to Registry of BP-ES-VQA02...
     
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2011

Commented:
Is the logons.txt being populated?

Remove the -d switch, it tells psexec not to wait for the process to exit before moving on.....

Author

Commented:
If i remove the -d i get nothing in the file
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2011
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.