Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Execute script setup and shutdown before windows shutdown blat automatically send email script template

2025-03-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Value: real-time grasp of switch records

Can also be set to remote login to send e-mail, real-time grasp the server remote login situation.

1. Start-- run-- gpedit.msc

two。 Policy-computer configuration-Windows settings-scripting (startup / shutdown)

3. Right-click "shutdown"

4. Add-browse: select script to determine

5. Complete the setup and restart the test.

Note: startup directory of shutdown script: C:\ Windows\ System32\ GroupPolicy\ Machine\ Scripts\ Shutdown\

Set name=%date:~0,4%%date:~5,2%%date:~8,2%

C:\ automail\ close.bat > > C:\ automail\ c%name%.log

Set name=%date:~0,4%%date:~5,2%%date:~8,2%

Set namet=%time:~0,2%%time:~3,2%%time:~6,2%

Rem-email content-

Set body= "% name%%time% your computer is turned off please be aware"

Rem-the subject of the email-

Set s = "% name%%namet% computer shutdown"

Rem-pick-up mailbox

Set t=nn1183@qq.com

Rem-sending mailbox-

Set f=442624872@qq.com

Rem-mailbox key-

Set pw=lxkzgtepiyemcajh

Rem-execute send-

C:\ automail\ Blat.exe-body% body%-s%-t% t%-server smtp.qq.com-f% f%-u% f%-pw% pw%

Study tutorial:

Video tutorial address

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report