Windows Vista Forums
Vista Forums Home Join Vista Forums Donate Vista Tutorials Tags

Welcome to Vista Forums we are your forum to discuss Windows Vista x64 and x86 systems. Whether you need help or just want to post an idea you have on Vista, this is the forum for you.
Register at Vista forums...the world biggest Windows Vista resource Join Vista Forums Now

Go Back   Vista Forums > Microsoft Technical Newsgroups > PowerShell

get the owner of a process

Update your Vista Drivers Update Your Drivers Now!!
Closed Thread
 
Thread Tools Display Modes
Old 11-06-2007   #1 (permalink)
Guest


 

get the owner of a process

hi there
i would like to get the name of te "owner " of a process i found with
get-wmiprobject win32_process :
actually, i need to know the "non-system processes" running on a remote
computer;

could you help me please ?
thx
Nico



My System SpecsSystem Spec
Old 11-06-2007   #2 (permalink)
Shay Levi
Guest


 

Re: get the owner of a process

This should do the trick

$regex = "LocalSystem|LocalService|NT AUTHORITY|NetworkService|ASPNET";
$svc = gwmi -query "select name,startname,SystemName from win32_service"
| where {$_.startname -notmatch $regex} | select SystemName,name,startname


-----
Shay Levi
$cript Fanatic
http://scriptolog.blogspot.com


Quote:

> hi there
> i would like to get the name of te "owner " of a process i found with
> get-wmiprobject win32_process :
> actually, i need to know the "non-system processes" running on a
> remote
> computer;
> could you help me please ?
> thx
> Nico

My System SpecsSystem Spec
Old 11-07-2007   #3 (permalink)
Nicopilami
Guest


 

Re: get the owner of a process

On 6 nov, 20:31, Shay Levi <n...@xxxxxx> wrote:
Quote:

> This should do the trick
>
> $regex = "LocalSystem|LocalService|NT AUTHORITY|NetworkService|ASPNET";
> $svc = gwmi -query "select name,startname,SystemName from win32_service"
> | where {$_.startname -notmatch $regex} | select SystemName,name,startname
>
> -----
> Shay Levi
> $cript Fanatichttp://scriptolog.blogspot.com
>
>
>
Quote:

> > hi there
> > i would like to get the name of te "owner " of a process i found with
> > get-wmiprobject win32_process :
> > actually, i need to know the "non-system processes" running on a
> > remote
> > computer;
> > could you help me please ?
> > thx
> > Nico- Masquer le texte des messages précédents -
>
> - Afficher le texte des messages précédents -
the problem is that i'd like to checks onto the processes, not the
services, but the startname property seems not to exist for this type
of objects

another idea ?
Nico

My System SpecsSystem Spec
Old 11-07-2007   #4 (permalink)
Thomas Lee
Guest


 

Re: get the owner of a process

In message <1194419045.334726.243640@xxxxxx>,
Nicopilami <n.chaussard@xxxxxx> writes
Quote:

>the problem is that i'd like to checks onto the processes, not the
>services, but the startname property seems not to exist for this type
>of objects
Then use WMI?
--
Thomas Lee
doctordns@xxxxxx
MVP - Admin Frameworks and Security
My System SpecsSystem Spec
Old 11-07-2007   #5 (permalink)
Shay Levi
Guest


 

Re: get the owner of a process

This will select all processes name and owner.

$p = gwmi win32_process
$p | select name,@{n="Owner";e={$_.GetOwner().Domain}}


-----
Shay Levi
$cript Fanatic
http://scriptolog.blogspot.com


Quote:

> On 6 nov, 20:31, Shay Levi <n...@xxxxxx> wrote:
>
Quote:

>> This should do the trick
>>
>> $regex = "LocalSystem|LocalService|NT
>> AUTHORITY|NetworkService|ASPNET"; $svc = gwmi -query "select
>> name,startname,SystemName from win32_service" | where {$_.startname
>> -notmatch $regex} | select SystemName,name,startname
>>
>> -----
>> Shay Levi
>> $cript Fanatichttp://scriptolog.blogspot.com
Quote:

>>> hi there
>>> i would like to get the name of te "owner " of a process i found
>>> with
>>> get-wmiprobject win32_process :
>>> actually, i need to know the "non-system processes" running on a
>>> remote
>>> computer;
>>> could you help me please ?
>>> thx
>>> Nico- Masquer le texte des messages pr?c?dents -
>> - Afficher le texte des messages pr?c?dents -
>>
> the problem is that i'd like to checks onto the processes, not the
> services, but the startname property seems not to exist for this type
> of objects
>
> another idea ?
> Nico

My System SpecsSystem Spec
Old 11-08-2007   #6 (permalink)
Guest


 

Re: get the owner of a process


"Shay Levi" <no@xxxxxx> a écrit dans le message de news:
8766a944ce6e8c9efa5034a12b6@xxxxxx...
Quote:

> This will select all processes name and owner.
> $p = gwmi win32_process
> $p | select name,@{n="Owner";e={$_.GetOwner().Domain}}
>
>
> -----
> Shay Levi
> $cript Fanatic
> http://scriptolog.blogspot.com
>
>
>
Quote:

>> On 6 nov, 20:31, Shay Levi <n...@xxxxxx> wrote:
>>
Quote:

>>> This should do the trick
>>>
>>> $regex = "LocalSystem|LocalService|NT
>>> AUTHORITY|NetworkService|ASPNET"; $svc = gwmi -query "select
>>> name,startname,SystemName from win32_service" | where {$_.startname
>>> -notmatch $regex} | select SystemName,name,startname
>>>
>>> -----
>>> Shay Levi
>>> $cript Fanatichttp://scriptolog.blogspot.com
>>>> hi there
>>>> i would like to get the name of te "owner " of a process i found
>>>> with
>>>> get-wmiprobject win32_process :
>>>> actually, i need to know the "non-system processes" running on a
>>>> remote
>>>> computer;
>>>> could you help me please ?
>>>> thx
>>>> Nico- Masquer le texte des messages pr?c?dents -
>>> - Afficher le texte des messages pr?c?dents -
>>>
>> the problem is that i'd like to checks onto the processes, not the
>> services, but the startname property seems not to exist for this type
>> of objects
>>
>> another idea ?
>> Nico
>
>
hey, exactly what i was looking for !!
thx
Nico


My System SpecsSystem Spec
Closed Thread

Thread Tools
Display Modes



Similar Threads
Thread Thread Starter Forum Replies Last Post
Change all references held by previous owner/administrator to new owner gerevent System Security 4 08-17-2008 07:05 PM
Process count wrong when only one process matches criteria malverson26 PowerShell 3 10-06-2007 03:01 AM
owner names everywhere puzzled Vista account administration 3 06-25-2007 12:36 PM
get-process & stop-process by owner Andrew Conrad PowerShell 3 03-03-2007 04:11 PM
Bug? Shouldn't Stop-Process automatically match Id if object is a process? Alex K. Angelopoulos [MVP] PowerShell 3 06-21-2006 05:35 AM


Vistax64.com 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 2005-2008

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 47 48 49 50 51