在脚本中的任务计划程序中更改密码

时间:2022-05-10 05:25:21

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.

由于我正在创建的计划任务数量不断增加,因此只需在Task Scheduler中更改密码就会花费大量时间。

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

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

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

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

1 个解决方案

#1


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命令创建批处理文件来安排和执行作业吗?以下是您之前未使用过该命令的示例:

HOW TO: Use the At.exe Command to Schedule a Backup in Windows NT

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

#1


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命令创建批处理文件来安排和执行作业吗?以下是您之前未使用过该命令的示例:

HOW TO: Use the At.exe Command to Schedule a Backup in Windows NT

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