在脚本中的任务计划程序中更改密码 [英] Change password in Task Scheduler in script

查看:96
本文介绍了在脚本中的任务计划程序中更改密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我每个月都会为我在任务计划程序中创建的所有计划任务更改密码.这是因为我们的安全政策每个月都会使我们的密码过期.

I'm changing password every month for all scheduled tasks I created in Task Scheduler. This is because our security policy expires our password every month.

由于我正在创建的计划任务数量不断增加,仅在 Task Scheduler 中更改密码就占用了大量时间.

Due to increasing number of scheduled tasks I'm creating, it eats up a lot of time in just changing password within Task Scheduler.

我的问题是:脚本中是否有一种方法可以通过指定任务、域\用户名和密码在一次运行中更改密码?

My question is: Is there a way in script to change password in one run specifying the tasks, DOMAIN\username, and password?

我知道将密码放入脚本存在安全风险.脚本中的密码在运行后会被删除.

I know there's a security risk in putting the password in script. The password in script will be removed after the running it.

推荐答案

听起来您的安全策略不允许您使用不会过期的密码设置帐户.您可以使用 at.exe 命令创建批处理文件来安排和执行作业吗?这是一个示例,以防您之前未使用过该命令:

It sounds like your security policy won't allow you to set up an account with a non-expiring password. Can you create a batch file with at.exe commands to schedule and execute jobs? Here is an example in case you haven't used the command before:

如何:使用 At.exe 命令在 Windows NT 中安排备份

这篇关于在脚本中的任务计划程序中更改密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆