I have a situation where I need to boot a VM into normal mode but disable as many services as possible. Basically we are doing a virtual to virtual conversion of the VM and the fewer services running, the less likely that a file will be locked and unable to be copied.
The conversion program (Citrix XenConvert) uses VSS to take a snapshot but still files are sometimes skipped because they are open.
I know the obvious question is "why not boot into safe mode with networking" - unfortunately, if I do that, it messes with the virtualization tools.
Ideally it would be a script that gets the vendor of every service that is running, and if the vendor is NOT microsoft, it stops the service. Even better would be an exclusion list, so that I could say "don't stop this vendor's services".
Do you incredibly smart and resourceful people have any idea where that script could be found? Or cobbled together quickly?
Many thanks!
Think you'll have to put together a list of services you want to stop manually, then create a batch file to stop /start them.
Typing
at a command prompt will return a list of running services.
will give you the basic windows services, though some of these can be stopped and there will likely be others in the list from net start that you won't want to stop. I suggest you experiment with a little trial and error.
Once you have the list of service names you wish to stop, create a .bat file with the following line repeated for every service you want to stop enclosed in quotes:
Create another .bat file with each service to start again when you're through: