D
djc
I'm trying to run a command that will check each computer on the network
(via net view output) to see if a specific process is running. I am using
Net View, FOR, and sysinternal's pslist. I'm assuming most in this forum
know what pslist does but just in case, it retrieves the running processes
for a local or remote computer. I know I can accomplish what I want via a
few seperate steps or commands but my intention is to make this one command.
I am no expert at this so if you think I should not do that and just create
a batch file then so be it. I will.
here is what I tried last:
FOR /F "skip=8" %i in ('net view') do pslist %i | findstr "processname"
I get an error stating that '|' was unexpected. Does this mean you cannot
pipe commands together when using the FOR command? or am I just doing it
wrong?
I know pslist has a parameter that you can use to specify a specific process
but I still would want to only display the actual lines with the process
name, not all the header information from the pslist program... there would
be too much output. So I think I need to be able to use the pipe function or
create a batch. But again, I'm no expert.
any input is appreciated. Thanks.
(via net view output) to see if a specific process is running. I am using
Net View, FOR, and sysinternal's pslist. I'm assuming most in this forum
know what pslist does but just in case, it retrieves the running processes
for a local or remote computer. I know I can accomplish what I want via a
few seperate steps or commands but my intention is to make this one command.
I am no expert at this so if you think I should not do that and just create
a batch file then so be it. I will.
here is what I tried last:
FOR /F "skip=8" %i in ('net view') do pslist %i | findstr "processname"
I get an error stating that '|' was unexpected. Does this mean you cannot
pipe commands together when using the FOR command? or am I just doing it
wrong?
I know pslist has a parameter that you can use to specify a specific process
but I still would want to only display the actual lines with the process
name, not all the header information from the pslist program... there would
be too much output. So I think I need to be able to use the pipe function or
create a batch. But again, I'm no expert.
any input is appreciated. Thanks.