>>windows2012R2 计划任务如何运行powershell 脚本
$Taskname = 'RunPSScriptAt9'
$user = "candyadministrator"
$scriptpath = "\powershellscripttest.ps1"
$trigger = New-ScheduledTaskTrigger -At 9:00am -Daily
$Action = New-ScheduledTaskAction -Execute "powershell.exe" -Argument "-executionpolicy bypass -noprofile -file $scriptpath"
Register-ScheduledTask -TaskName $Taskname -Trigger $trigger -User $user -Action $Action -RunLevel Highest -Force
您可以尝试以上的脚本来新建计划任务来测试是否可以自动周期运行。
此致
Candy
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.
最后
以上就是可靠烤鸡最近收集整理的关于在windows下运行linux脚本,windows2012R2 计划任务如何运行powershell 脚本的全部内容,更多相关在windows下运行linux脚本,windows2012R2内容请搜索靠谱客的其他文章。
发表评论 取消回复