Schedule computer shutdown – vbscript

It’s always fun automating stuff using vbscript. As a DBA it’s an added advantage, if you know some scripting languages like VBS, Powershell etc. I assume you are familiar with the auto sleep mode available in TV, which turns it off after so and so minutes. We too have this kind of functionality in other home appliances like microwave, washing machine etc etc. Like wise, we need something for our personal computer also, to turn it off after a certain period of time. It’s useful when you have kept some process running in the background and you know the process will take approximately an hour to complete and you want the PC to be shutdown once the process is completed. Here is the small VB script to schedule computer shutdown process.

Copy above codes into a text file, save the file with extension .vbs instead of default .txt

auto-shutdown-vbscript-01

auto-shutdown-vbscript-02

auto-shutdown-vbscript-03

auto-shutdown-vbscript-04auto-shutdown-vbscript-05

Prasad Sahoo

Prasad Sahoo, is an enthusiast of Microsoft technologies in general and a passionate database professional, mainly focusing on SQL Server performance tuning and business intelligence. He has contributed a long time of his career working on SQL Server and other RDBMS. If he is not busy with SQL stuff then he must be watching some Hollywood movies.

Leave a Reply

%d bloggers like this: