How i can check Ram used per process and owner on remote server?

Well, powershell!

You can see the result on the print screen

image-excel-sort

here’s the script

# ==============================================================================================
# 
# Check Ram utilisation on Remote Server
# 
# AUTHOR: ABDI Medhi , www.medkorp.com/DoTheJob
# DATE  : 02/03/2012
# 
# COMMENT: 
# 
# ==============================================================================================
$Server = Read-Host "Enter Server Name"
$path = Get-Location

#Excel part
$xl=New-Object -ComObject "Excel.Application"
$xl.Visible = $True
$wb=$xl.Workbooks.Add()
$ws=$wb.ActiveSheet
$cells=$ws.Cells

#Formating Excel
$cells.item(1,1)= "Process Name"
$cells.item(1,2)= "Owner"
$cells.item(1,3)= "Ram Used (Mo)"

#Display in Excel
$cells.item(1,1).font.bold=$True
$cells.item(1,2).font.bold=$True
$cells.item(1,3).font.bold=$True
$cells.item(1,1).font.size=14
$cells.item(1,2).font.size=14
$cells.item(1,3).font.size=14

#Starting At column 1 Row 3
$row=3
$col=1

$processList = Get-WmiObject -ComputerName $Server Win32_Process | sort ws -Descending
foreach($process in $processList)
{
$cells.item($row,1) = $process.name
$Users = "\" +$process.getowner().user
$Domain = $process.getowner().domain
$cells.item($row,2) = ($Domain +$Users)
$bytes = $process.ws
$Ram = [math]::truncate($bytes /1MB)
$cells.item($row,3) = $Ram
$row++
}

$range = $ws.usedrange
[void] $range.entirecolumn.autofit()

$xl.displayalerts=$False
#$wb.SaveAs("$Server.xls")
$wb.SaveAs("$Server.xls")
sleep 3

$wb.Close()
$xl.Quit()

sleep 5
$Mydocs = [environment]::getfolderpath("mydocuments")
Invoke-Item "$Mydocs\$Server.xls"