Suspend & resume a process using script/command

In procexp (Process Explorer), we can suspend & resume back a process.

What's the equivalent command or tools to do this?

In our AV suit, I'll need to distribute the scan across Mon-Sat but to do this
from the AV's management console, it involves a lot of manual efforts &
each time a new VM is provisioned, have to keep track.

So I thought of using a random function that generates 0 to 4 that saves
this number into the thousands of Windows VMs & then use a script
to suspend & resume the coreShellService process (the AV process)
0 to 5 days later when the manual weekly scan commences on Mon
0100hrs.

With command line AV scanner, I could use Unix Shell scripts to do
this with a random function & make the script sleep 0 to 5 days before
'waking' up to trigger the manual scan.

This will minimize the chance of an AV scan storm which suddenly
chews up a lot of resource across the vSphere cluster
sunhuxAsked:
Who is Participating?
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.

CoralonCommented:
I don't think you can do that based on the command line options for process explorer (even looking through the documentation).

There isn't any easy way to pause a process.  However, there is a codeplex piece of software that may help you accomplish this.  http://www.codeproject.com/Articles/2964/Win-process-suspend-resume-tool

Coralon
0
sunhuxAuthor Commented:
Thanks very much;  found from that link there's equivalent MS tool ie pssuspend (& /r  to resume):
https://technet.microsoft.com/en-us/sysinternals/bb897540.aspx

Well, now I run into yet another issue:
coreShellService process provides both Realtime as well manual scan so if I suspend this process
(for x number of days where x is 0 to 5) to defer the manual scan to x days later, this means for
this duration of x days, Realtime AV will not function which will pose a risk if we get viruses
0
sunhuxAuthor Commented:
To help me, anyone know if there's equivalent tools in Windows 2008 R2 x64
for iorenice & renice  used in Linux to throttle IO & CPU utilization ?
0
ON-DEMAND: 10 Easy Ways to Lose a Password

Learn about the methods that hackers use to lift real, working credentials from even the most security-savvy employees in this on-demand webinar. We cover the importance of multi-factor authentication and how these solutions can better protect your business!

CoralonCommented:
You could try the gnu version of nice? http://gnuwin32.sourceforge.net/packages/coreutils.htm

or this one.. https://stefan.huberdoc.at/renice/  (it's in german, but you can use google to translate it.

Coralon
0
sunhuxAuthor Commented:
Ok, got the nice tool (to lower CPU priority) for Windows.

Any idea where I can get ionice or iorenice equivalent for Windows 2008 R2
that are ready to run (without compiling)?
0
CoralonCommented:
Here's the closest I could find:
http://sourceforge.net/projects/iopriority/

https://rubygems.org/gems/windows_ionice

I can't find anything for iorenice :-\

Coralon
0

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
sunhuxAuthor Commented:
The 1st link for iopriority could do iorenice actually.

The 2nd link does not appear to give me anything useable or did I miss something?
0
CoralonCommented:
The download link is on the bottom right..

I haven't done anything with it.

Coralon
0
sunhuxAuthor Commented:
Ok thanks, I downloaded  windows_ionice-0.1.1.gem from that
Download link on the bottom right of the 2nd link.

So how do I install / run this  .gem  file?
0
RobOwner (Aidellio)Commented:
The gem file is a Ruby library. You would have to code a Ruby app to use it.

gem install windows_ionice

This is a demo for how to install and use a Ruby gem: http://www.sitepoint.com/getting-started-ruby/
0
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
Microsoft Legacy OS

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.