【windows脚本】组策略\关机脚本_windows关机前执行脚本-CSDN博客

环境

系统:win10_x64

概述

组策略中添加关机前运行脚本。下面教程是:关闭windows系统前,自动备份windows日志至e盘。

步骤

1、快捷方式 win+R 启动 运行,输入gpedit.msc调出本地组策略。

2、右键 关机,选择 属性。

3、点击 添加,增加关机时执行的脚本。

4、点选确定,完成设置。

5、自动备份windows日志至e盘的脚本。

@echo offchcp 65001 copy C:\Windows\System32\winevt\Logs\Application.evtx e:\LOGS\ /Ycopy C:\Windows\System32\winevt\Logs\Security.evtx e:\LOGS\ /Ycopy C:\Windows\System32\winevt\Logs\Setup.evtx e:\LOGS\ /Ycopy C:\Windows\System32\winevt\Logs\System.evtx e:\LOGS\ /Y

原网址: 访问
创建于: 2024-02-28 11:56:35
目录: default
标签: 无

请先后发表评论
  • 最新评论
  • 总共0条评论