Best way to know which computer a user is logged into, server 2003 (I know...I's about to be replaced)

Have a user generating large amounts of spam would like to follow which computer(s) he's logging into.
LVL 17
WORKS2011Austin Tech CompanyAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

NVITEnd-user supportCommented:
Use PsLoggedOn from Microsoft

PsLoggedOn usernname

Open in new window

searches the network and shows computer names he is logged on to

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Larry Struckmeyer MVPCommented:
Have a user generating large amounts of spam would like to follow which computer(s) he's logging into.

Normally this is a rouge SMTP engine on a particular system and would not follow the user unless you have roaming profiles.  Regardless you should be able to stop spam from leaving your network by stopping any outgoing traffic at the edge/router/firewall.  If you have a local email server limit the outgoing to the IP of the legit mail server.
Will SzymkowskiSenior Solution ArchitectCommented:
As stated by Larry email can come from any machine. It is not based on where the user is logged into. However below is  a quest cmdlet that i found awhile back that allows you to find users that are logged into machines.

Add-PSSnapin Quest.ActiveRoles.ADManagement -ErrorAction SilentlyContinue
$ErrorActionPreference = "SilentlyContinue"

# Retrieve Username to search for, error checks to make sure the username
# is not blank and that it exists in Active Directory

Function Get-Username {
$Global:Username = Read-Host "Enter username you want to search for"
if ($Username -eq $null){
	Write-Host "Username cannot be blank, please re-enter username!!!!!"
$UserCheck = Get-QADUser -SamAccountName $Username
if ($UserCheck -eq $null){
	Write-Host "Invalid username, please verify this is the logon id for the account"

# Change this line of code for different search criteria's
$computers = Get-QADComputer -SearchRoot "ou=testou,dc=domain,dc=com" -OSName "*Windows*" -SizeLimit 0 | where {$_.accountisdisabled -eq $false}
foreach ($comp in $computers)
	$Computer = $comp.Name
	$ping = new-object System.Net.NetworkInformation.Ping
  	$Reply = $null
  	$Reply = $ping.send($Computer)
  	if($Reply.status -like 'Success'){
		#Get explorer.exe processes
		$proc = gwmi win32_process -computer $Computer -Filter "Name = 'explorer.exe'"
		#Search collection of processes for username
		ForEach ($p in $proc) {
	    	$temp = ($p.GetOwner()).User
	  		if ($temp -eq $Username){
			write-host "$Username is logged on $Computer"

Open in new window

Need More Insight Into What’s Killing Your Network

Flow data analysis from SolarWinds NetFlow Traffic Analyzer (NTA), along with Network Performance Monitor (NPM), can give you deeper visibility into your network’s traffic.

Kevin HaysIT AnalystCommented:
As Larry has suggested this is normally a spam bot transmitting hundreds of messages per minute.  You can use wireshark and place a hub/router behind your main firewall to capture smtp traffic and then identify which IP is going crazy.

I also use a small batch script at the domain level in the GPO to just log the username, IP, machine name, time and date when a user executes a login / loggoff located in a hidden share on one of my servers for my use only.
Larry Struckmeyer MVPCommented:
You can also turn off every machine and bring them up one at a time.  Unfortunately for any of these methods to work the spam bot has to be active and many of them send in bursts and are quiet much/most of the time.

Block port 25 outgoing at the firewall and scan each system wit the anti-malware app of your choice.  Malwarebytes or Super Anti Spyware are both good for this.
Renato Montenegro RusticiIT SpecialistCommented:
Are you using the native SMTP (IIS)? Well, if so, you can switch on the SMTP logging in IIS, leave it on for a couple of days and then import the resulting log file in Excel. Then, generate a Pivot Table counting by IP address, order it. That will give you the IP addresses in a Top Senders format. Match the offending source IP address with your DHCP database to find out the computer where the spam is coming from.

If you are not running the IIS SMTP, search your solution for a similar logging feature and then import the file in Excel.

Hope that it works for you.
WORKS2011Austin Tech CompanyAuthor Commented:
great thank you
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2003

From novice to tech pro — start learning today.