2. Enumerating the processes
@echo for each PS in GetObject _ >ps.vbs
@echo ("Winmgmts:\\.\root\cimv2:win32_process"). Instances_ >>ps.vbs
@echo WScript.Echo Ps.handle^&vbtab^&ps.name^&vbtab^&ps.executablepath:next >>ps.vbs
Usage: cscript ps.vbs
3. Termination of the process
@echo for each PS in GetObject _ >pskill.vbs
@echo ("Winmgmts:\\.\root\cimv2:win32_process"). Instances_ >>pskill.vbs
@echo if ps.handle=wscript.arguments (0) then WScript.Echo ps.terminate:end If:next >>pskill.vbs
Usage: cscript pskill.vbs PID
4. Reboot the system
@echo for each OS in GetObject _ >reboot.vbs
@echo ("Winmgmts:!\\.\root\cimv2:win32_operatingsystem"). Instances_ >>reboot.vbs
@echo Os.win32shutdown (2): Next >>reboot.vbs
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.