quest powershell:如何运行计划任务?
如何使用 Quest powershell 管理单元运行计划任务?
How do you run a scheduled task with Quest powershell snap in?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
如何使用 Quest powershell 管理单元运行计划任务?
How do you run a scheduled task with Quest powershell snap in?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
您可以安排 PowerShell.exe,并使用其命令行参数之一来指定要运行的脚本。 在该脚本的开头添加:
Add-PSSnapin Quest.ActiveRoles.ADManagement
这将加载该脚本的管理单元,然后执行脚本中的其他内容。
(顺便说一句,对于任何需要一个或多个额外管理单元的脚本来说都是这种情况。)
You would schedule PowerShell.exe, and use one of its command-line parameters to specify the script to run. At the start of that script, add:
Add-PSSnapin Quest.ActiveRoles.ADManagement
That will load the snapin for that script, and then execute whatever else is in the script.
(BTW, this would be the case for any script that needs one or more extra snapins.)
另一种选择是创建一个控制台文件(使用 Export-Console - 这将创建 *.psc1 )并将 -PSConsoleFile YourConsole.psc1 添加到 powershell.exe 命令行。
Another option would be to create a console file (using Export-Console - which will create a *.psc1 ) and adding -PSConsoleFile YourConsole.psc1 to your powershell.exe command line.