每分钟在后台运行一次 powershell 脚本 [英] Run a powershell script in the background once per minute
本文介绍了每分钟在后台运行一次 powershell 脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我希望在后台每分钟运行一次 powershell 脚本.可能不会出现任何窗口.我该怎么做?
I want a powershell script to be run once per minute in the background. No window may appear. How do I do it?
推荐答案
使用 Windows 任务计划程序并像这样运行您的脚本:
Use the Windows Task Scheduler and run your script like this:
powershell -File myScript.ps1 -WindowStyle Hidden
进一步创建脚本,使其在特定用户帐户下运行,不仅在该用户登录时运行.否则你会看到一个控制台窗口.
Furthermore create the script that it runs under a specific user account and not only when that user is logged on. Otherwise you'll see a console window.
这篇关于每分钟在后台运行一次 powershell 脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文